CWE-125

Reading data outside the bounds of allocated memory at runtime, potentially leaking sensitive information from process memory....

Verified by Precogs Threat Research
BASE SCORE
7.5 CRITICAL

Precogs AI Insight

"Precogs AI runtime analysis detects memory read violations that could expose secrets, keys, or PII from running processes."

EXPLOIT PROBABILITYHigh
PUBLIC POCAvailable

What is CWE-125 (Out-of-bounds Read)?

Reading data outside the bounds of allocated memory at runtime, potentially leaking sensitive information from process memory.

Vulnerability Insights

In the context of binary ai-powered dast vulnerabilities, this vulnerability poses significant risk because compiled binaries and complex AI logic cannot be easily patched without vendor cooperation. Organizations relying on third-party software must use structural analysis tools to detect these flaws.

Impact on Systems

  • Information Disclosure: Reading sensitive data from adjacent memory
  • Security Bypass: Leaking memory addresses to defeat ASLR
  • Denial of Service: Triggering segmentation faults

Real-World Attack Scenario

The attacker manipulates a user-controlled index parameter to point beyond the intended array boundaries. Because the application fails to validate the index, it retrieves and returns the value residing at that arbitrary memory location, effectively leaking internal secrets such as cryptographic keys or memory layout details.

Code Examples

Vulnerable Implementation

int get_item(int index) {
    int array[10] = { /* ... */ };
    // VULNERABLE: No validation that index is within array bounds
    return array[index];
}

Secure Alternative

int get_item(int index) {
    int array[10] = { /* ... */ };
    // SECURE: Strict boundary validation prevents out-of-bounds reading
    if (index >= 0 && index < 10) return array[index];
    return -1;
}

Remediation

Ensure robust input validation, boundary checking, and adherence to secure architecture frameworks when designing Binary DAST solutions. Use automated code scanning or binary analysis to detect flaws early in the SDLC.