CWE-805: Buffer Access with Incorrect Length Value

BaseIncompleteExploit Likelihood: High

The product uses a sequential operation to read or write a buffer, but it uses an incorrect length value that causes it to access memory that is outside of the bounds of the buffer.

View on MITRE
Back to CWE Lookup

Extended Description

When the length value exceeds the size of the destination, a buffer overflow could occur.

Technical Details

Structure
Simple

Applicable To

Languages
CC++Assembly
Platforms

Frequently Asked Questions

What is CWE-805: Buffer Access with Incorrect Length Value?+

CWE-805: Buffer Access with Incorrect Length Value is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product uses a sequential operation to read or write a buffer, but it uses an incorrect length value that causes it to access memory that is outside of the bounds of the buffer. When the length value exceeds the size of the destination, a buffer overflow could occur.

What are the security consequences of Buffer Access with Incorrect Length Value?+

If exploited, CWE-805 (Buffer Access with Incorrect Length Value) it can compromise Integrity, Confidentiality and Availability, leading to outcomes such as Read Memory, Modify Memory, Execute Unauthorized Code or Commands, DoS: Crash, Exit, or Restart and DoS: Resource Consumption (CPU).

Which programming languages are affected by Buffer Access with Incorrect Length Value?+

CWE-805 commonly affects C, C++ and Assembly. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Buffer Access with Incorrect Length Value?+

MITRE documents real CVEs mapped to CWE-805, including CVE-2011-1959, CVE-2011-1848, CVE-2011-0105, CVE-2011-0606 and CVE-2011-0651. 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-805 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.

Learn More