CWE-913 · Słabość
Improper Control of Dynamically-Managed Code Resources
- Abstrakcja
- Klasa
- Status
- Niekompletny
- Dodano
- 26 stycznia 2013
- Ostatnia zmiana
- 11 grudnia 2025
Opis
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.
Skutki
Integrity
Execute Unauthorized Code or Commands
Other, Integrity
Varies by Context; Alter Execution Logic
Zapobieganie
Implementation · Input Validation
For any externally-influenced input, check the input against an allowlist of acceptable values.
Implementation, Architecture and Design · Refactoring
Refactor the code so that it does not need to be dynamically managed.
Przykłady podatności
- CVE-2022-2054 Python compiler uses eval() to execute malicious strings as Python code.
- CVE-2018-1000613 Cryptography API uses unsafe reflection when deserializing a private key
- CVE-2015-8103 Deserialization issue in commonly-used Java library allows remote execution.
- CVE-2006-7079 Chain: extract used for register_globals compatibility layer, enables path traversal (CWE-22)
- CVE-2012-2055 Source version control product allows modification of trusted key using mass assignment.
Słabość nadrzędna
Słabości podrzędne
- CWE-94 Improper Control of Generation of Code ('Code Injection')
- CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
- CWE-502 Deserialization of Untrusted Data
- CWE-914 Improper Control of Dynamically-Identified Variables
- CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Kiedy powstaje
- Architecture and Design
- Implementation
Dotyczy
Not Language-Specific, Interpreted
Wpis z katalogu CWE 4.20.