CWE-913
Improper Control of Dynamically-Managed Code Resources
Description
The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.
Many languages offer powerful features that allow the programmer to dynamically create or modify existing code, or resources used by code such as variables and objects. While these features can offer significant flexibility and reduce development time, they can be extremely dangerous if attackers can directly influence these code resources in unexpected ways.
Parent Weaknesses (ChildOf)
Common Consequences
Scope
Impact
Execute Unauthorized Code or Commands
Scope
Impact
Varies by Context, Alter Execution Logic
Potential Mitigations
For any externally-influenced input, check the input against an allowlist of acceptable values.
Refactor the code so that it does not need to be dynamically managed.
CVE-2022-2054Python compiler uses eval() to execute malicious strings as Python code.
CVE-2018-1000613Cryptography API uses unsafe reflection when deserializing a private key
CVE-2015-8103Deserialization issue in commonly-used Java library allows remote execution.
CVE-2006-7079Chain: extract used for register_globals compatibility layer, enables path traversal (CWE-22)
CVE-2012-2055Source version control product allows modification of trusted key using mass assignment.
Applicable Platforms
Security Training
Train your team to recognize and prevent security threats with our comprehensive security awareness program.
Start TrainingVulnerability Scanning
Discover vulnerabilities in your applications and infrastructure before attackers do.
Scan Now