Back to Labs
Weakness (CWE)

CWE-125

Out-of-bounds Read

About

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

Common consequences

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

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
  • Architecture and Design: Use a language that provides appropriate memory abstractions.

CVEs with this weakness

Frequently asked questions

What is CWE-125?

The product reads data past the end, or before the beginning, of the intended buffer. Common consequences Confidentiality → Read Memory Confidentiality → Bypass Protection Mechanism Availability → DoS: Crash, Exit, or Restart Other → Varies by Context Mitigations Implementation: Assume all input is malicious.

Which platforms does CWE-125 affect?

CWE-125 has been observed on: Memory-Unsafe, C, C++, ICS/OT.

How many CVEs does Rainforest track for CWE-125?

Rainforest Labs currently tracks 6 published CVEs mapped to CWE-125. They are listed on this page.

Empower Your Security Strategy with Rainforest

Discover vulnerabilities early, prioritize critical threats, and protect what truly matters. Rainforest streamlines your security operations, saving you time and reducing costs, so you can focus on what drives your business forward.