CWE-125: Out-of-bounds Read

low-risk

The product reads data past the end, or before the beginning, of the intended buffer.

Abstraction: Base

Common Consequences

Confidentiality Read Memory
Confidentiality Bypass Protection Mechanism
Availability DoS: Crash, Exit, or Restart
Other Varies by Context

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].

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2014-0160 7.5 94.5% Y
CVE-2014-0160 7.5 94.5% Y
CVE-2024-49113 7.5 88.6%
CVE-2020-8794 9.8 88.1%
CVE-2021-4034 7.8 87.8% Y
CVE-2024-48456 7.5 81.3%
CVE-2023-4427 8.1 79.3%
CVE-2016-5198 8.8 77.9% Y
CVE-2019-16098 7.8 77.2%
CVE-2018-8139 7.5 77.0%
5
/ 100
low-risk
Active Threat 4/50 · Minimal
Exploit Availability 1/50 · Minimal