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.
View on MITREMany 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.
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.
No detection method information available for this CWE.
Cryptography API uses unsafe reflection when deserializing a private key
View DetailsDeserialization issue in commonly-used Java library allows remote execution.
View DetailsChain: extract used for register_globals compatibility layer, enables path traversal (CWE-22)
View DetailsSource version control product allows modification of trusted key using mass assignment.
View DetailsCWE-913: Improper Control of Dynamically-Managed Code Resources is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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.
If exploited, CWE-913 (Improper Control of Dynamically-Managed Code Resources) it can compromise Integrity and Other, leading to outcomes such as Execute Unauthorized Code or Commands, Varies by Context and Alter Execution Logic.
Recommended mitigations for CWE-913 include: 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.
MITRE documents real CVEs mapped to CWE-913, including CVE-2022-2054, CVE-2018-1000613, CVE-2015-8103, CVE-2006-7079 and CVE-2012-2055. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
A CWE (Common Weakness Enumeration) like CWE-913 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.