CWE-125
Weakness AllowedOut-of-bounds Read
Abstraction: Base · Status: Draft
The product reads data past the end, or before the beginning, of the intended buffer.
Dimensions
- Behavior-Type: Read
- Resource-Type: Memory Buffer
- Resource-Property: Out-of-bounds
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Relationships and members
Modes of introduction
Detection methods
Fuzzing
Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.
Effectiveness: High
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Automated Dynamic Analysis
Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].
Effectiveness: Moderate
Crafted inputs are necessary to reach the code containing the error, such as generated by fuzzers. Also, these tools may reduce performance, and they only report the error condition - not the original mistake that led to the error.
Content history
Provided diagram to improve CWE usability
updated Applicable_Platforms, Relationships, Taxonomy_Mappings, Weakness_Ordinalities
updated Description
updated Relationships
updated Common_Consequences
updated Demonstrative_Examples, References, Relationships
updated Related_Attack_Patterns
updated Relationships, Taxonomy_Mappings
updated Relationships
updated Causal_Nature, Observed_Examples, Taxonomy_Mappings
updated Description
updated Relationships
updated Description, Related_Attack_Patterns
updated Common_Consequences, Observed_Examples, Potential_Mitigations, References, Relationships
updated Potential_Mitigations, Relationships, Taxonomy_Mappings
updated Observed_Examples, Potential_Mitigations
updated Observed_Examples, Potential_Mitigations, Relationships
updated Related_Attack_Patterns, Relationships
updated Observed_Examples, Relationships
updated Research_Gaps
updated Observed_Examples, Relationships
updated Applicable_Platforms, Relationships, Taxonomy_Mappings
updated Description
updated Detection_Factors, References, Relationships
updated Mapping_Notes, Relationships
updated Observed_Examples
updated Alternate_Terms, Common_Consequences, Description, Diagram, Weakness_Ordinalities
updated Observed_Examples, Relationships
updated Affected_Resources, Demonstrative_Examples, Functional_Areas
updated Applicable_Platforms, Detection_Factors, References, Relationships
updated Applicable_Platforms, Demonstrative_Examples, Dimensions, Observed_Examples, References, Relationships, Taxonomy_Mappings
14392 vulnerabilities reference this CWE, most recent first.
GHSA-G664-7845-Q82J
Vulnerability from github – Published: 2022-05-13 01:18 – Updated: 2025-04-12 13:07Multiple integer overflows in X.org libXtst before 1.2.3 allow remote X servers to trigger out-of-bounds memory access operations by leveraging the lack of range checks.
{
"affected": [],
"aliases": [
"CVE-2016-7951"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2016-12-13T20:59:00Z",
"severity": "CRITICAL"
},
"details": "Multiple integer overflows in X.org libXtst before 1.2.3 allow remote X servers to trigger out-of-bounds memory access operations by leveraging the lack of range checks.",
"id": "GHSA-g664-7845-q82j",
"modified": "2025-04-12T13:07:19Z",
"published": "2022-05-13T01:18:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-7951"
},
{
"type": "WEB",
"url": "https://cgit.freedesktop.org/xorg/lib/libXtst/commit/?id=9556ad67af3129ec4a7a4f4b54a0d59701beeae3"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AFLHX7WNEUXXDAGR324T35L5P6RRR7GE"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RVEUZRHYY3AJEKMFQ4DS7DX3Y2AICFP7"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AFLHX7WNEUXXDAGR324T35L5P6RRR7GE"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RVEUZRHYY3AJEKMFQ4DS7DX3Y2AICFP7"
},
{
"type": "WEB",
"url": "https://lists.x.org/archives/xorg-announce/2016-October/002720.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/10/04/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/10/04/4"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/93370"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1036945"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G668-X6WM-WHP7
Vulnerability from github – Published: 2022-05-24 16:52 – Updated: 2023-02-28 15:30When PHP EXIF extension is parsing EXIF information from an image, e.g. via exif_read_data() function, in PHP versions 7.1.x below 7.1.31, 7.2.x below 7.2.21 and 7.3.x below 7.3.8 it is possible to supply it with data what will cause it to read past the allocated buffer. This may lead to information disclosure or crash.
{
"affected": [],
"aliases": [
"CVE-2019-11041"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-08-09T20:15:00Z",
"severity": "HIGH"
},
"details": "When PHP EXIF extension is parsing EXIF information from an image, e.g. via exif_read_data() function, in PHP versions 7.1.x below 7.1.31, 7.2.x below 7.2.21 and 7.3.x below 7.3.8 it is possible to supply it with data what will cause it to read past the allocated buffer. This may lead to information disclosure or crash.",
"id": "GHSA-g668-x6wm-whp7",
"modified": "2023-02-28T15:30:22Z",
"published": "2022-05-24T16:52:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-11041"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2019:3299"
},
{
"type": "WEB",
"url": "https://bugs.php.net/bug.php?id=78222"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2019/08/msg00010.html"
},
{
"type": "WEB",
"url": "https://seclists.org/bugtraq/2019/Oct/9"
},
{
"type": "WEB",
"url": "https://seclists.org/bugtraq/2019/Sep/35"
},
{
"type": "WEB",
"url": "https://seclists.org/bugtraq/2019/Sep/38"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20190822-0003"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT210634"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT210722"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/4097-1"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/4097-2"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2019/dsa-4527"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2019/dsa-4529"
},
{
"type": "WEB",
"url": "https://www.tenable.com/security/tns-2021-14"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00019.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2019/Oct/15"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2019/Oct/55"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G66R-7W88-P6CV
Vulnerability from github – Published: 2024-12-12 03:33 – Updated: 2024-12-12 03:33Wireless Wide Area Network Service (WwanSvc) Elevation of Privilege Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-49109"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-12T02:04:37Z",
"severity": "MODERATE"
},
"details": "Wireless Wide Area Network Service (WwanSvc) Elevation of Privilege Vulnerability",
"id": "GHSA-g66r-7w88-p6cv",
"modified": "2024-12-12T03:33:05Z",
"published": "2024-12-12T03:33:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49109"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49109"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G682-7GQF-WRJP
Vulnerability from github – Published: 2025-06-10 18:32 – Updated: 2025-06-10 18:32InDesign Desktop versions ID20.2, ID19.5.3 and earlier are affected by an out-of-bounds read vulnerability that could lead to disclosure of sensitive memory. An attacker could leverage this vulnerability to bypass mitigations such as ASLR. Exploitation of this issue requires user interaction in that a victim must open a malicious file.
{
"affected": [],
"aliases": [
"CVE-2025-47104"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-10T17:23:19Z",
"severity": "MODERATE"
},
"details": "InDesign Desktop versions ID20.2, ID19.5.3 and earlier are affected by an out-of-bounds read vulnerability that could lead to disclosure of sensitive memory. An attacker could leverage this vulnerability to bypass mitigations such as ASLR. Exploitation of this issue requires user interaction in that a victim must open a malicious file.",
"id": "GHSA-g682-7gqf-wrjp",
"modified": "2025-06-10T18:32:29Z",
"published": "2025-06-10T18:32:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-47104"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/indesign/apsb25-53.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-G68G-G7CJ-R38F
Vulnerability from github – Published: 2022-05-24 19:01 – Updated: 2022-05-24 19:01Exim 4 before 4.94.2 allows Out-of-bounds Read because pdkim_finish_bodyhash does not validate the relationship between sig->bodyhash.len and b->bh.len; thus, a crafted DKIM-Signature header might lead to a leak of sensitive information from process memory.
{
"affected": [],
"aliases": [
"CVE-2020-28025"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-05-06T13:15:00Z",
"severity": "HIGH"
},
"details": "Exim 4 before 4.94.2 allows Out-of-bounds Read because pdkim_finish_bodyhash does not validate the relationship between sig-\u003ebodyhash.len and b-\u003ebh.len; thus, a crafted DKIM-Signature header might lead to a leak of sensitive information from process memory.",
"id": "GHSA-g68g-g7cj-r38f",
"modified": "2022-05-24T19:01:38Z",
"published": "2022-05-24T19:01:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28025"
},
{
"type": "WEB",
"url": "https://www.exim.org/static/doc/security/CVE-2020-qualys/CVE-2020-28025-BHASH.txt"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-G68R-C5P5-F438
Vulnerability from github – Published: 2024-09-02 06:30 – Updated: 2024-09-05 15:33In power, there is a possible out of bounds read due to a missing bounds check. This could lead to local information disclosure with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS08944204; Issue ID: MSV-1560.
{
"affected": [],
"aliases": [
"CVE-2024-20085"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-02T05:15:14Z",
"severity": "MODERATE"
},
"details": "In power, there is a possible out of bounds read due to a missing bounds check. This could lead to local information disclosure with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS08944204; Issue ID: MSV-1560.",
"id": "GHSA-g68r-c5p5-f438",
"modified": "2024-09-05T15:33:34Z",
"published": "2024-09-02T06:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-20085"
},
{
"type": "WEB",
"url": "https://corp.mediatek.com/product-security-bulletin/September-2024"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-G68W-5CH6-CVQM
Vulnerability from github – Published: 2022-05-17 02:46 – Updated: 2022-05-17 02:46coders/psd.c in ImageMagick allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted PSD file.
{
"affected": [],
"aliases": [
"CVE-2016-7532"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-04-20T18:59:00Z",
"severity": "MODERATE"
},
"details": "coders/psd.c in ImageMagick allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted PSD file.",
"id": "GHSA-g68w-5ch6-cvqm",
"modified": "2022-05-17T02:46:53Z",
"published": "2022-05-17T02:46:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-7532"
},
{
"type": "WEB",
"url": "https://github.com/ImageMagick/ImageMagick/issues/109"
},
{
"type": "WEB",
"url": "https://github.com/ImageMagick/ImageMagick/commit/4f2c04ea6673863b87ac7f186cbb0d911f74085c"
},
{
"type": "WEB",
"url": "https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1539066"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1378764"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/09/22/2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/93131"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G68X-XFR2-VVXJ
Vulnerability from github – Published: 2026-11-18 15:34 – Updated: 2026-11-18 15:34Tanium addressed an information disclosure vulnerability in Tanium Server.
{
"affected": [],
"aliases": [
"CVE-2026-108317"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-18T14:17:23Z",
"severity": "MODERATE"
},
"details": "Tanium addressed an information disclosure vulnerability in Tanium Server.",
"id": "GHSA-g68x-xfr2-vvxj",
"modified": "2026-11-18T15:34:31Z",
"published": "2026-11-18T15:34:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-108317"
},
{
"type": "WEB",
"url": "https://security.tanium.com/TAN-2026-105"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-G69C-6PFV-54P9
Vulnerability from github – Published: 2026-04-09 15:35 – Updated: 2026-04-14 18:30An out-of-bounds read vulnerability exists in the DecodeLookupTable function within DicomImageDecoder.cpp. The lookup-table decoding logic used for PALETTE COLOR images does not validate pixel indices against the lookup table size. Crafted images containing indices larger than the palette size cause the decoder to read beyond allocated lookup table memory and expose heap contents in the output image.
{
"affected": [],
"aliases": [
"CVE-2026-5445"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-09T15:16:16Z",
"severity": "CRITICAL"
},
"details": "An out-of-bounds read vulnerability exists in the `DecodeLookupTable` function within `DicomImageDecoder.cpp`. The lookup-table decoding logic used for `PALETTE COLOR` images does not validate pixel indices against the lookup table size. Crafted images containing indices larger than the palette size cause the decoder to read beyond allocated lookup table memory and expose heap contents in the output image.",
"id": "GHSA-g69c-6pfv-54p9",
"modified": "2026-04-14T18:30:32Z",
"published": "2026-04-09T15:35:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5445"
},
{
"type": "WEB",
"url": "https://kb.cert.org/vuls/id/536588"
},
{
"type": "WEB",
"url": "https://www.machinespirits.de"
},
{
"type": "WEB",
"url": "https://www.orthanc-server.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G69V-8JXX-GWPG
Vulnerability from github – Published: 2022-05-13 01:11 – Updated: 2022-05-13 01:11unrar 0.0.1 (aka unrar-free or unrar-gpl) suffers from a stack-based buffer over-read in unrarlib.c, related to ExtrFile and stricomp.
{
"affected": [],
"aliases": [
"CVE-2017-14122"
],
"database_specific": {
"cwe_ids": [
"CWE-125"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-09-03T20:29:00Z",
"severity": "CRITICAL"
},
"details": "unrar 0.0.1 (aka unrar-free or unrar-gpl) suffers from a stack-based buffer over-read in unrarlib.c, related to ExtrFile and stricomp.",
"id": "GHSA-g69v-8jxx-gwpg",
"modified": "2022-05-13T01:11:38Z",
"published": "2022-05-13T01:11:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-14122"
},
{
"type": "WEB",
"url": "https://bugs.debian.org/874060"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2021/02/msg00026.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2017/08/20/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.
Mitigation
Strategy: Language Selection
Use a language that provides appropriate memory abstractions.
CAPEC-540: Overread Buffers
An adversary attacks a target by providing input that causes an application to read beyond the boundary of a defined buffer. This typically occurs when a value influencing where to start or stop reading is set to reflect positions outside of the valid memory location of the buffer. This type of attack may result in exposure of sensitive information, a system crash, or arbitrary code execution.