What is CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer?+
CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Is CWE-119 in the CWE Top 25 Most Dangerous Software Weaknesses?+
Yes. CWE-119 ranked #15 in the CWE Top 25 for 2024, associated with 819 CVEs that year. The CWE Top 25 highlights the most common and impactful software weaknesses based on real-world vulnerability data.
What are the security consequences of Improper Restriction of Operations within the Bounds of a Memory Buffer?+
If exploited, CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) it can compromise Integrity, Confidentiality and Availability, leading to outcomes such as Execute Unauthorized Code or Commands, Modify Memory, Read Memory, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU) and DoS: Resource Consumption (Memory).
How is Improper Restriction of Operations within the Bounds of a Memory Buffer detected?+
CWE-119 can be detected using Automated Static Analysis - Binary or Bytecode, Manual Static Analysis - Binary or Bytecode, Dynamic Analysis with Automated Results Interpretation, Dynamic Analysis with Manual Results Interpretation, Manual Static Analysis - Source Code and Automated Static Analysis - Source Code. Combining automated tooling with manual review typically yields the best coverage.
Which programming languages are affected by Improper Restriction of Operations within the Bounds of a Memory Buffer?+
CWE-119 commonly affects C, C++, Memory-Unsafe and Assembly. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
What are real-world examples of Improper Restriction of Operations within the Bounds of a Memory Buffer?+
MITRE documents real CVEs mapped to CWE-119, including CVE-2021-22991, CVE-2025-47153, CVE-2020-29557, CVE-2009-2550 and CVE-2009-2403. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
What is the difference between a CWE and a CVE?+
A CWE (Common Weakness Enumeration) like CWE-119 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.