CWEweakness
CWE-125 Out-of-bounds Read
- Alternate terms
- OOB read
- Abstraction
- Base
- Structure
- Simple
- Status
- Draft
- Languages
- C, C++, Go, Memory-Unsafe
- CWE version
- 5.0
Description
The product reads data past the end, or before the beginning, of the intended buffer.
Common consequences
• Confidentiality: Read Memory — An attacker could get secret values such as cryptographic keys, PII, memory addresses, or other information that could be used in additional attacks.
• Confidentiality: Bypass Protection Mechanism — Out-of-bounds memory could contain memory addresses or other information that can be used to bypass ASLR and other protection mechanisms in order to improve the reliability of exploiting a separate weakness for code execution.
• Availability: DoS: Crash, Exit, or Restart — An attacker could cause a segmentation fault or crash by causing memory to be read outside of the bounds of the buffer. This is especially likely when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string.
• Other: Varies by Context — The read operation could produce other undefined or unexpected results.
Potential mitigations
• [Implementation] 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.
• [Architecture and Design] Use a language that provides appropriate memory abstractions.
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.
• 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.)
• 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].
Observed examples
• CVE-2026-7320: Out-of-bounds read in audio processor used in a common web browser, allowing a read of the global data section
• CVE-2023-1018: The reference implementation code for a Trusted Platform Module does not implement length checks on data, allowing for an attacker to read 2 bytes past the end of a buffer.
• CVE-2020-11899: Out-of-bounds read in IP stack used in embedded systems, as exploited in the wild per CISA KEV.
• CVE-2014-0160: Chain: "Heartbleed" bug receives an inconsistent length parameter (CWE-130) enabling an out-of-bounds read (CWE-126), returning memory that could include private cryptographic keys and other sensitive data.
• CVE-2021-40985: HTML conversion package has a buffer under-read, allowing a crash
• CVE-2018-10887: Chain: unexpected sign extension (CWE-194) leads to integer overflow (CWE-190), causing an out-of-bounds read (CWE-125)
• CVE-2009-2523: Chain: product does not handle when an input string is not NULL terminated (CWE-170), leading to buffer over-read (CWE-125) or heap-based buffer overflow (CWE-122).
• CVE-2018-16069: Chain: series of floating-point precision errors
(CWE-1339) in a web browser rendering engine causes out-of-bounds read
(CWE-125), giving access to cross-origin data
• CVE-2004-0112: out-of-bounds read due to improper length check
• CVE-2004-0183: packet with large number of specified elements cause out-of-bounds read.
• CVE-2004-0221: packet with large number of specified elements cause out-of-bounds read.
• CVE-2004-0184: out-of-bounds read, resultant from integer underflow
• CVE-2004-1940: large length value causes out-of-bounds read
• CVE-2004-0421: malformed image causes out-of-bounds read
• CVE-2008-4113: OS kernel trusts userland-supplied length value, allowing reading of sensitive information
Related
Attack pattern · CAPEC (1)
- CAPEC-540 Overread Buffers attack pattern
Observed example · CVE (15)
- CVE-2026-7320 Information disclosure due to incorrect boundary conditions in the Audio/Video component. vulnerability
- CVE-2023-1018 An out-of-bounds read vulnerability exists in TPM2.0's Module Library allowing a 2-byte read past the end of a TPM2.0 command in the… vulnerability
- CVE-2021-40985 A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to… vulnerability
- CVE-2020-11899 The Treck TCP/IP stack before 6.0.1.66 has an IPv6 Out-of-bounds Read. vulnerability
- CVE-2018-16069 Unintended floating-point error accumulation in SwiftShader in Google Chrome prior to 69.0.3497.81 allowed a remote attacker to leak… vulnerability
- CVE-2018-10887 A flaw was found in libgit2 before version 0.27.3. vulnerability
- CVE-2014-0160 The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packets, which allows… vulnerability
- CVE-2009-2523 The License Logging Server (llssrv.exe) in Microsoft Windows 2000 SP4 allows remote attackers to execute arbitrary code via an RPC message… vulnerability
- CVE-2008-4113 The sctp_getsockopt_hmac_ident function in net/sctp/socket.c in the Stream Control Transmission Protocol (sctp) implementation in the Linux… vulnerability
- CVE-2004-1940 sipclient.cpp in KPhone 4.0.1 and earlier allows remote attackers to cause a denial of service (crash) via a STUN response packet with a… vulnerability
- CVE-2004-0112 The SSL/TLS handshaking code in OpenSSL 0.9.7a, 0.9.7b, and 0.9.7c, when using Kerberos ciphersuites, does not properly check the length of… vulnerability
- CVE-2004-0421 The Portable Network Graphics library (libpng) 1.0.15 and earlier allows attackers to cause a denial of service (crash) via a malformed PNG… vulnerability
- CVE-2004-0183 TCPDUMP 3.8.1 and earlier allows remote attackers to cause a denial of service (crash) via ISAKMP packets containing a Delete payload with… vulnerability
- CVE-2004-0184 Integer underflow in the isakmp_id_print for TCPDUMP 3.8.1 and earlier allows remote attackers to cause a denial of service (crash) via an… vulnerability
- CVE-2004-0221 isakmpd in OpenBSD 3.4 and earlier allows remote attackers to cause a denial of service (crash) via an ISAKMP packet with a delete payload… vulnerability
Child of · CWE (1)
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness
Referenced by CAPEC · weakness (1)
- CAPEC-540 Overread Buffers attack pattern
Referenced by CVE · weakness (10,484)
- CVE-2026-111734 P-Net before 1.0.3 does not validate the length of a received Ethernet frame in pf_eth_recv() before reading the EtherType, any VLAN tags… vulnerability
- CVE-2026-111735 P-Net before 1.0.3 contains an integer underflow in pf_cpm_c_data_ind(). vulnerability
- CVE-2026-115795 P-Net before 1.0.3 does not check that a complete block header is present in the received data before reading the next block in DCP Set and… vulnerability
- CVE-2026-115942 A misconfigured wildcard TLS certificate causes a stack read overflow. vulnerability
- CVE-2026-119053 lwIP 2.0.0 through 2.2.1 built with the SNMP agent contains an out-of-bounds read vulnerability in snmp_pbuf_stream_writeto() that bounds… vulnerability
- CVE-2026-85498 A flaw was found in polkit. vulnerability
- CVE-2026-90869 A remote attacker who knows a valid account's enrolled SSH public key can terminate the shared SSH service in Progress Software WS_FTP… vulnerability
- CVE-2026-93009 A flaw was found in dnsmasq. vulnerability
- CVE-2026-103390 An Out-of-Bounds Read vulnerability in the HttpParser component in Juniper Networks Session Smart Router and Session Smart Conductor allows… vulnerability
- CVE-2026-103393 An Out-of-Bounds Read vulnerability in the VRRP implementation in Juniper Networks Session Smart Router allows an L2-adjacent attacker to… vulnerability
- CVE-2026-118608 Alpine iLX-F511 libanwbtstack.so prh_rfcomm_cc_process_test Out-Of-Bounds Read Information Disclosure Vulnerability. vulnerability
- CVE-2024-58399 llama.cpp before b2731 contains an out-of-bounds read vulnerability in llama_model_loader that allows attackers to read memory outside the… vulnerability
- CVE-2025-71439 llama.cpp before b5649 contains a heap out-of-bounds read vulnerability in llama_vocab::impl::print_info() that allows attackers to crash… vulnerability
- CVE-2026-105946 Out-of-bounds read in the QAuthenticator NTLM authentication handling in the Qt Network module in Qt Group Qt allows remote attackers to… vulnerability
- CVE-2026-107472 An out-of-bounds read vulnerability in the QTextCodec TSCII encoding of the Qt 5 Compatibility APIs module (Qt Core in Qt 5 and earlier)… vulnerability
- CVE-2026-108330 Tanium addressed an information disclosure vulnerability in Threat Response Client Extension. vulnerability
- CVE-2026-116620 A security vulnerability has been detected in Tencent RapidJSON up to 1.1.0. vulnerability
- CVE-2026-116841 DevilutionX 1.4.0 through 1.5.5 contains an out-of-bounds read vulnerability in the bundled libmpq libmpq__file_number_from_hash function… vulnerability
- CVE-2026-117556 zchunk before 1.5.5 contains a heap out-of-bounds read vulnerability in read_preface() in src/lib/header.c that passes the total header… vulnerability
- CVE-2026-117557 SDL_image through 3.4.8 and through 2.8.12 contains a stack out-of-bounds read vulnerability in IMG_LoadLBM_IO() in src/IMG_lbm.c that… vulnerability
- CVE-2026-48380 Substance3D - Painter is affected by an out-of-bounds read vulnerability that could lead to disclosure of sensitive memory. vulnerability
- CVE-2026-57192 Asterisk is an open source private branch exchange and telephony toolkit. vulnerability
- CVE-2026-58496 Thor Vector Graphics (ThorVG) is a production-ready vector graphics engine. vulnerability
- CVE-2026-93862 An out-of-bounds read vulnerability in the FireCluster Sync processing allows an attacker positioned on the cluster interconnect, such as a… vulnerability
- CVE-2026-107157 Specially crafted CBOR input passed to QCborValue::fromCbor() in Qt Core can cause an out-of-bounds read, which may crash the application… vulnerability
- CVE-2026-107896 V-SFT provided by FUJI ELECTRIC CO., LTD. vulnerability
- CVE-2026-107897 V-SFT provided by FUJI ELECTRIC CO., LTD. vulnerability
- CVE-2026-107898 V-SFT provided by FUJI ELECTRIC CO., LTD. vulnerability
- CVE-2026-107899 V-SFT provided by FUJI ELECTRIC CO., LTD. vulnerability
- CVE-2026-107900 V-SFT provided by FUJI ELECTRIC CO., LTD. vulnerability
Referenced by CWE · can precede (4)
Referenced by CWE · child of (2)
Referenced by CWE · has member (8)
- CWE-1200 Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors view
- CWE-1337 Weaknesses in the 2021 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1350 Weaknesses in the 2020 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1387 Weaknesses in the 2022 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1425 Weaknesses in the 2023 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1430 Weaknesses in the 2024 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1435 Weaknesses in the 2025 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1468 Weaknesses Addressed by the OWASP Golang Secure Coding Practices Guide view
Referenced by OWASP · mapped cwe (1)
- CS-Drone_Security Drone Security Cheat Sheet Cheat Sheet