CWE•Variant•Draft•20 recent CVEs
CWE-129Improper Validation of Array Index
Description
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.
Common consequences
- Integrity,Availability→DoS: Crash, Exit, or RestartUse 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 MemoryIf the memory corrupted is data, rather than instructions, the system will continue to function with improper values.
- Confidentiality,Integrity→Modify Memory,Read MemoryUse 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 modif
- Integrity,Confidentiality,Availability→Execute Unauthorized Code or CommandsIf 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 MemoryA 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 cr
Potential mitigations
- Architecture and DesignUse an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
- Architecture and Design[object Object]
- Requirements[object Object]
- Operation,Build and Compilation[object Object]
- Operation[object Object]
- Implementation[object Object]
- ImplementationBe especially careful to validate all input when invoking code that crosses language boundaries, such as from an interpreted language to native code. This could create an unexpected interaction between the language boundaries. Ensure that you are not violating any of the expectations of the language with which you are interfacing. For example, even though Java may not be susceptible to buffer over
- Architecture and Design,OperationRun your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database ad
- Architecture and Design,Operation[object Object]
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-456245.12026-06-10CVE-2026-453595.72026-06-10CVE-2026-241817.32026-06-09CVE-2026-252768.82026-06-01CVE-2026-461637.82026-05-28CVE-2026-451047.52026-05-27CVE-2026-443105.42026-05-15CVE-2023-313092026-05-15CVE-2026-442226.52026-05-12CVE-2026-416437.52026-05-07CVE-2026-402516.52026-05-06CVE-2026-317767.82026-05-01CVE-2026-317647.82026-05-01CVE-2026-317297.82026-05-01CVE-2026-408867.72026-04-23CVE-2026-400973.72026-04-10CVE-2026-349422026-04-09CVE-2026-214139.82026-04-07CVE-2026-234487.82026-04-03CVE-2026-234477.82026-04-03