CWE-466: Return of Pointer Value Outside of Expected Range

BaseDraft

A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.

View on MITRE
Back to CWE Lookup

Technical Details

Structure
Simple

Applicable To

Languages
CC++
Platforms

Frequently Asked Questions

What is CWE-466: Return of Pointer Value Outside of Expected Range?+

CWE-466: Return of Pointer Value Outside of Expected Range is a Common Weakness Enumeration (CWE) entry maintained by MITRE. A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.

What are the security consequences of Return of Pointer Value Outside of Expected Range?+

If exploited, CWE-466 (Return of Pointer Value Outside of Expected Range) it can compromise Confidentiality and Integrity, leading to outcomes such as Read Memory and Modify Memory.

Which programming languages are affected by Return of Pointer Value Outside of Expected Range?+

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

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-466 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