CWE-129Improper Validation of Array Index

PUBLISHEDweakness recordHigh
released 2006-07-19 · last modified 2025-12-11

Metadata

CWE ID:
CWE-129
摘要:
Variant
结构:
Simple
状态:
Draft
发布日期:
2006-07-19
更新日期:
2025-12-11

名称

Improper Validation of Array Index

描述

The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.

常见后果

范围:
Integrity, Availability
影响:
DoS: Crash, Exit, or Restart
注释:
Use of an index that is outside the bounds of an array will very likely result in the corruption of relevant memory and perhaps instructions, leading to a crash, if the values are outside of the valid memory area.
范围:
Integrity
影响:
Modify Memory
注释:
If the memory corrupted is data, rather than instructions, the system will continue to function with improper values.
范围:
Confidentiality, Integrity
影响:
Modify Memory, Read Memory
注释:
Use of an index that is outside the bounds of an array can also trigger out-of-bounds read or write operations, or operations on the wrong objects; i.e., "buffer overflows" are not always the result. This may result in the exposure or modification of sensitive data.
范围:
Integrity, Confidentiality, Availability
影响:
Execute Unauthorized Code or Commands
注释:
If the memory accessible by the attacker can be effectively controlled, it may be possible to execute arbitrary code, as with a standard buffer overflow and possibly without the use of large inputs if a precise index can be controlled.
范围:
Integrity, Availability, Confidentiality
影响:
DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Read Memory, Modify Memory
注释:
A single fault could allow either an overflow (CWE-788) or underflow (CWE-786) of the array index. What happens next will depend on the type of operation being performed out of bounds, but can expose sensitive information, cause a system crash, or possibly lead to arbitrary code execution.

相关 CWE