CWE-119
DiscouragedImproper Restriction of Operations within the Bounds of a Memory Buffer
Abstraction: Class · Status: Stable
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
17506 vulnerabilities reference this CWE, most recent first.
GHSA-5J8R-5F3R-4W9P
Vulnerability from github – Published: 2026-01-26 06:30 – Updated: 2026-02-23 09:31A security vulnerability has been detected in GPAC up to 2.4.0. This affects the function gf_text_import_srt_bifs of the file src/scene_manager/text_to_bifs.c of the component SRT Subtitle Import. Such manipulation leads to out-of-bounds write. The attack needs to be performed locally. The exploit has been disclosed publicly and may be used. The name of the patch is 10c73b82cf0e367383d091db38566a0e4fe71772. It is best practice to apply a patch to resolve this issue.
{
"affected": [],
"aliases": [
"CVE-2026-1418"
],
"database_specific": {
"cwe_ids": [
"CWE-119",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-26T04:16:10Z",
"severity": "MODERATE"
},
"details": "A security vulnerability has been detected in GPAC up to 2.4.0. This affects the function gf_text_import_srt_bifs of the file src/scene_manager/text_to_bifs.c of the component SRT Subtitle Import. Such manipulation leads to out-of-bounds write. The attack needs to be performed locally. The exploit has been disclosed publicly and may be used. The name of the patch is 10c73b82cf0e367383d091db38566a0e4fe71772. It is best practice to apply a patch to resolve this issue.",
"id": "GHSA-5j8r-5f3r-4w9p",
"modified": "2026-02-23T09:31:22Z",
"published": "2026-01-26T06:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1418"
},
{
"type": "WEB",
"url": "https://github.com/gpac/gpac/issues/3425"
},
{
"type": "WEB",
"url": "https://github.com/gpac/gpac/issues/3425#issue-3801961068"
},
{
"type": "WEB",
"url": "https://github.com/enocknt/gpac/commit/10c73b82cf0e367383d091db38566a0e4fe71772"
},
{
"type": "WEB",
"url": "https://github.com/gpac/gpac"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.342807"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.342807"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.736544"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-5J8X-4QFW-CWJ9
Vulnerability from github – Published: 2022-04-08 00:00 – Updated: 2022-04-19 00:01An authenticated, remote attacker can gain access to a dereferenced pointer contained in a request. This causes a null pointer dereference in the CmpSettings component of the affected CODESYS products and leads to a crash.
{
"affected": [],
"aliases": [
"CVE-2022-22514"
],
"database_specific": {
"cwe_ids": [
"CWE-119",
"CWE-822"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-04-07T19:15:00Z",
"severity": "HIGH"
},
"details": "An authenticated, remote attacker can gain access to a dereferenced pointer contained in a request. This causes a null pointer dereference in the CmpSettings component of the affected CODESYS products and leads to a crash.",
"id": "GHSA-5j8x-4qfw-cwj9",
"modified": "2022-04-19T00:01:33Z",
"published": "2022-04-08T00:00:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-22514"
},
{
"type": "WEB",
"url": "https://customers.codesys.com/index.php?eID=dumpFile\u0026t=f\u0026f=17093\u0026token=15cd8424832ea10dcd4873a409a09a539ee381ca\u0026download="
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5J9F-CJ24-V3H6
Vulnerability from github – Published: 2022-05-13 01:02 – Updated: 2022-05-13 01:02Inappropriate use of partition alloc in PDFium in Google Chrome prior to 61.0.3163.79 for Linux, Windows, and Mac, and 61.0.3163.81 for Android, allowed a remote attacker to potentially exploit memory corruption via a crafted PDF file.
{
"affected": [],
"aliases": [
"CVE-2017-5114"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-10-27T05:29:00Z",
"severity": "HIGH"
},
"details": "Inappropriate use of partition alloc in PDFium in Google Chrome prior to 61.0.3163.79 for Linux, Windows, and Mac, and 61.0.3163.81 for Android, allowed a remote attacker to potentially exploit memory corruption via a crafted PDF file.",
"id": "GHSA-5j9f-cj24-v3h6",
"modified": "2022-05-13T01:02:48Z",
"published": "2022-05-13T01:02:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-5114"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2017:2676"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2017/09/stable-channel-update-for-desktop.html"
},
{
"type": "WEB",
"url": "https://crbug.com/752829"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201709-15"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2017/dsa-3985"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/100610"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1039291"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5JF2-JG34-FJX5
Vulnerability from github – Published: 2022-05-14 03:24 – Updated: 2022-05-14 03:24In Android before 2018-04-05 or earlier security patch level on Qualcomm Snapdragon Automobile, Snapdragon Mobile, and Snapdragon Wear MDM9206, MDM9650, MSM8909W, SD 210/SD 212/SD 205, SD 400, SD 410/12, SD 425, SD 430, SD 450, SD 615/16/SD 415, SD 617, SD 625, SD 650/52, SD 800, SD 808, SD 810, SD 820, SD 820A, SD 835, SD 845, and SD 850, Input_address is registered as a shared buffer and is not properly checked before use in OEMCrypto_Generic_Sign(). This allows addresses to be accessed that reside in secure/CP memory.
{
"affected": [],
"aliases": [
"CVE-2015-9176"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-04-18T14:29:00Z",
"severity": "HIGH"
},
"details": "In Android before 2018-04-05 or earlier security patch level on Qualcomm Snapdragon Automobile, Snapdragon Mobile, and Snapdragon Wear MDM9206, MDM9650, MSM8909W, SD 210/SD 212/SD 205, SD 400, SD 410/12, SD 425, SD 430, SD 450, SD 615/16/SD 415, SD 617, SD 625, SD 650/52, SD 800, SD 808, SD 810, SD 820, SD 820A, SD 835, SD 845, and SD 850, Input_address is registered as a shared buffer and is not properly checked before use in OEMCrypto_Generic_Sign(). This allows addresses to be accessed that reside in secure/CP memory.",
"id": "GHSA-5jf2-jg34-fjx5",
"modified": "2022-05-14T03:24:53Z",
"published": "2022-05-14T03:24:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-9176"
},
{
"type": "WEB",
"url": "https://source.android.com/security/bulletin/2018-04-01"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/103671"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5JF4-J2RC-RH9X
Vulnerability from github – Published: 2022-05-01 18:31 – Updated: 2025-04-09 03:47Heap-based buffer overflow in ConeXware PowerArchiver before 10.20.21 might allow remote attackers to execute arbitrary code via a long filename in a BlackHole archive.
{
"affected": [],
"aliases": [
"CVE-2007-5279"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-10-09T00:17:00Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in ConeXware PowerArchiver before 10.20.21 might allow remote attackers to execute arbitrary code via a long filename in a BlackHole archive.",
"id": "GHSA-5jf4-j2rc-rh9x",
"modified": "2025-04-09T03:47:02Z",
"published": "2022-05-01T18:31:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5279"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36969"
},
{
"type": "WEB",
"url": "http://jvn.jp/jp/JVN%2361323184/index.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/41552"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/27000"
},
{
"type": "WEB",
"url": "http://www.fourteenforty.jp/research/advisory.cgi?FFRRA-20071009"
},
{
"type": "WEB",
"url": "http://www.powerarchiver.com/news"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25938"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3378"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5JFR-9RR4-M9QM
Vulnerability from github – Published: 2025-04-03 15:31 – Updated: 2025-04-03 15:31A vulnerability has been found in Open Asset Import Library Assimp 5.4.3 and classified as problematic. This vulnerability affects the function Assimp::SceneCombiner::AddNodeHashes of the file code/Common/SceneCombiner.cpp of the component File Handler. The manipulation leads to out-of-bounds read. An attack has to be approached locally. The exploit has been disclosed to the public and may be used. The patch is identified as a0993658f40d8e13ff5823990c30b43c82a5daf0. It is recommended to apply a patch to fix this issue.
{
"affected": [],
"aliases": [
"CVE-2025-3160"
],
"database_specific": {
"cwe_ids": [
"CWE-119",
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-03T15:15:52Z",
"severity": "MODERATE"
},
"details": "A vulnerability has been found in Open Asset Import Library Assimp 5.4.3 and classified as problematic. This vulnerability affects the function Assimp::SceneCombiner::AddNodeHashes of the file code/Common/SceneCombiner.cpp of the component File Handler. The manipulation leads to out-of-bounds read. An attack has to be approached locally. The exploit has been disclosed to the public and may be used. The patch is identified as a0993658f40d8e13ff5823990c30b43c82a5daf0. It is recommended to apply a patch to fix this issue.",
"id": "GHSA-5jfr-9rr4-m9qm",
"modified": "2025-04-03T15:31:20Z",
"published": "2025-04-03T15:31:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-3160"
},
{
"type": "WEB",
"url": "https://github.com/assimp/assimp/issues/6025"
},
{
"type": "WEB",
"url": "https://github.com/assimp/assimp/issues/6025#issue-2877385383"
},
{
"type": "WEB",
"url": "https://github.com/assimp/assimp/pull/6049"
},
{
"type": "WEB",
"url": "https://github.com/assimp/assimp/commit/a0993658f40d8e13ff5823990c30b43c82a5daf0"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.303106"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.303106"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.542248"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-5JG2-WPMW-V3WH
Vulnerability from github – Published: 2022-05-01 02:24 – Updated: 2022-05-01 02:24Multiple heap-based buffer overflows in QuickTime.qts in Apple QuickTime Player 7.0.3 and iTunes 6.0.1 (3) and earlier allow remote attackers to cause a denial of service (crash) and execute arbitrary code via a .mov file with (1) a Movie Resource atom with a large size value, or (2) an stsd atom with a modified Sample Description Table size value, and possibly other vectors involving media files. NOTE: item 1 was originally identified by CVE-2005-4127 for a pre-patch announcement, and item 2 was originally identified by CVE-2005-4128 for a pre-patch announcement.
{
"affected": [],
"aliases": [
"CVE-2005-4092"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2005-12-08T11:03:00Z",
"severity": "HIGH"
},
"details": "Multiple heap-based buffer overflows in QuickTime.qts in Apple QuickTime Player 7.0.3 and iTunes 6.0.1 (3) and earlier allow remote attackers to cause a denial of service (crash) and execute arbitrary code via a .mov file with (1) a Movie Resource atom with a large size value, or (2) an stsd atom with a modified Sample Description Table size value, and possibly other vectors involving media files. NOTE: item 1 was originally identified by CVE-2005-4127 for a pre-patch announcement, and item 2 was originally identified by CVE-2005-4128 for a pre-patch announcement.",
"id": "GHSA-5jg2-wpmw-v3wh",
"modified": "2022-05-01T02:24:19Z",
"published": "2022-05-01T02:24:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2005-4092"
},
{
"type": "WEB",
"url": "http://docs.info.apple.com/article.html?artnum=303101"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/18149"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/18370"
},
{
"type": "WEB",
"url": "http://security-protocols.com/advisory/sp-x21-advisory.txt"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/334"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/336"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1015356"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1015396"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1015397"
},
{
"type": "WEB",
"url": "http://www.eeye.com/html/research/upcoming/20051117a.html"
},
{
"type": "WEB",
"url": "http://www.eeye.com/html/research/upcoming/20051117b.html"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/921193"
},
{
"type": "WEB",
"url": "http://www.security-protocols.com/advisory/sp-x21-advisory.txt"
},
{
"type": "WEB",
"url": "http://www.security-protocols.com/modules.php?name=News\u0026file=article\u0026sid=3109"
},
{
"type": "WEB",
"url": "http://www.security-protocols.com/modules.php?name=News\u0026file=article\u0026sid=3133"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/421547/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/421569/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/421635/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/15732"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-011A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2005/3012"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/0128"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5JH3-6RJ9-M2G2
Vulnerability from github – Published: 2022-05-01 18:09 – Updated: 2022-05-01 18:09Multiple buffer overflows in certain ActiveX controls in sasatl.dll in Zenturi ProgramChecker allow remote attackers to execute arbitrary code via unspecified vectors, possibly involving the (1) DebugMsgLog or (2) DoFileProperties methods.
{
"affected": [],
"aliases": [
"CVE-2007-2987"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-06-01T10:30:00Z",
"severity": "HIGH"
},
"details": "Multiple buffer overflows in certain ActiveX controls in sasatl.dll in Zenturi ProgramChecker allow remote attackers to execute arbitrary code via unspecified vectors, possibly involving the (1) DebugMsgLog or (2) DoFileProperties methods.",
"id": "GHSA-5jh3-6rj9-m2g2",
"modified": "2022-05-01T18:09:21Z",
"published": "2022-05-01T18:09:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-2987"
},
{
"type": "WEB",
"url": "http://osvdb.org/36715"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/25473"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/603529"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/24217"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/24274"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/1977"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5JHG-R53R-XQCR
Vulnerability from github – Published: 2022-05-14 03:54 – Updated: 2022-05-14 03:54tif_write.c in libtiff 4.0.6 has an issue in the error code path of TIFFFlushData1() that didn't reset the tif_rawcc and tif_rawcp members. Reported as MSVR 35095, aka "TIFFFlushData1 heap-buffer-overflow."
{
"affected": [],
"aliases": [
"CVE-2016-9534"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2016-11-22T19:59:00Z",
"severity": "CRITICAL"
},
"details": "tif_write.c in libtiff 4.0.6 has an issue in the error code path of TIFFFlushData1() that didn\u0027t reset the tif_rawcc and tif_rawcp members. Reported as MSVR 35095, aka \"TIFFFlushData1 heap-buffer-overflow.\"",
"id": "GHSA-5jhg-r53r-xqcr",
"modified": "2022-05-14T03:54:59Z",
"published": "2022-05-14T03:54:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-9534"
},
{
"type": "WEB",
"url": "https://github.com/vadz/libtiff/commit/83a4b92815ea04969d494416eaae3d4c6b338e4a#diff-5be5ce02d0dea67050d5b2a10102d1ba"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2017-0225.html"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2017/dsa-3762"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/94484"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/94743"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5JHJ-GM5G-9W95
Vulnerability from github – Published: 2022-05-14 02:31 – Updated: 2022-05-14 02:31Microsoft Internet Explorer 9 through 11 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka "Internet Explorer Memory Corruption Vulnerability," a different vulnerability than CVE-2014-1773, CVE-2014-1783, CVE-2014-1784, CVE-2014-1786, CVE-2014-1795, CVE-2014-1805, CVE-2014-2759, CVE-2014-2765, CVE-2014-2766, and CVE-2014-2775.
{
"affected": [],
"aliases": [
"CVE-2014-2758"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-11T04:56:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 9 through 11 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka \"Internet Explorer Memory Corruption Vulnerability,\" a different vulnerability than CVE-2014-1773, CVE-2014-1783, CVE-2014-1784, CVE-2014-1786, CVE-2014-1795, CVE-2014-1805, CVE-2014-2759, CVE-2014-2765, CVE-2014-2766, and CVE-2014-2775.",
"id": "GHSA-5jhj-gm5g-9w95",
"modified": "2022-05-14T02:31:57Z",
"published": "2022-05-14T02:31:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-2758"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-035"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/67843"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1030370"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation MIT-3
Strategy: Language Selection
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer.
- Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
Mitigation MIT-4.1
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Mitigation MIT-10
Strategy: Environment Hardening
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking.
- D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
Mitigation MIT-9
- Consider adhering to the following rules when allocating and managing an application's memory:
- Double check that the buffer is as large as specified.
- When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string.
- Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space.
- If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.
Mitigation MIT-11
Strategy: Environment Hardening
- Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.
- Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.
- For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].
Mitigation MIT-12
Strategy: Environment Hardening
- Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment.
- For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].
Mitigation MIT-13
Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.
CAPEC-10: Buffer Overflow via Environment Variables
This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the adversary finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
CAPEC-100: Overflow Buffers
Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an adversary. As a consequence, an adversary is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the adversaries' choice.
CAPEC-123: Buffer Manipulation
An adversary manipulates an application's interaction with a buffer in an attempt to read or modify data they shouldn't have access to. Buffer attacks are distinguished in that it is the buffer space itself that is the target of the attack rather than any code responsible for interpreting the content of the buffer. In virtually all buffer attacks the content that is placed in the buffer is immaterial. Instead, most buffer attacks involve retrieving or providing more input than can be stored in the allocated buffer, resulting in the reading or overwriting of other unintended program memory.
CAPEC-14: Client-side Injection-induced Buffer Overflow
This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service. This hostile service is created to deliver the correct content to the client software. For example, if the client-side application is a browser, the service will host a webpage that the browser loads.
CAPEC-24: Filter Failure through Buffer Overflow
In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
CAPEC-42: MIME Conversion
An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
CAPEC-44: Overflow Binary Resource File
An attack of this type exploits a buffer overflow vulnerability in the handling of binary resources. Binary resources may include music files like MP3, image files like JPEG files, and any other binary file. These attacks may pass unnoticed to the client machine through normal usage of files, such as a browser loading a seemingly innocent JPEG file. This can allow the adversary access to the execution stack and execute arbitrary code in the target process.
CAPEC-45: Buffer Overflow via Symbolic Links
This type of attack leverages the use of symbolic links to cause buffer overflows. An adversary can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
CAPEC-46: Overflow Variables and Tags
This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The adversary crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
CAPEC-47: Buffer Overflow via Parameter Expansion
In this attack, the target software is given input that the adversary knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
CAPEC-8: Buffer Overflow in an API Call
This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An adversary who has knowledge of known vulnerable libraries or shared code can easily target software that makes use of these libraries. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
CAPEC-9: Buffer Overflow in Local Command-Line Utilities
This attack targets command-line utilities available in a number of shells. An adversary can leverage a vulnerability found in a command-line utility to escalate privilege to root.