CWE•Base•Incomplete•3 recent CVEs
CWE-914Improper Control of Dynamically-Identified Variables
Description
The product does not properly restrict reading from or writing to dynamically-identified variables.
Many languages offer powerful features that allow the programmer to access arbitrary variables that are specified by an input string. While these features can offer significant flexibility and reduce development time, they can be extremely dangerous if attackers can modify unintended variables that have security implications.
Common consequences
- Integrity→Modify Application DataAn attacker could modify sensitive data or program variables.
- Integrity→Execute Unauthorized Code or Commands
- Other,Integrity→Varies by Context,Alter Execution Logic
Potential mitigations
- ImplementationFor any externally-influenced input, check the input against an allowlist of internal program variables that are allowed to be modified.
- Implementation,Architecture and DesignRefactor the code so that internal program variables do not need to be dynamically identified.