Skip to main content

CWE-913: Improper Control of Dynamically-Managed Code Resources

ClassIncomplete

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 MITRE
Back to CWE Lookup

Extended Description

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.

Technical Details

Structure
Simple

Applicable To

Languages
Platforms

Frequently Asked Questions

What is CWE-913: Improper Control of Dynamically-Managed Code Resources?+

CWE-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.

What are the security consequences of Improper Control of Dynamically-Managed Code Resources?+

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.

How do you prevent or mitigate Improper Control of Dynamically-Managed Code Resources?+

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.

What are real-world examples of Improper Control of Dynamically-Managed Code Resources?+

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.

What is the difference between a CWE and a CVE?+

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.

Learn More