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

What is CWE-913?

CWE-913 is Improper Control of Dynamically-Managed Code Resources. The flaw arises when 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. The database currently holds 34 vulnerabilities mapped to CWE-913 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

Analyzing data...

OWASP Top 10 Rank-
Related CVES (365 days)34
AbstractionClass
Likelihood of exploit-

Vulnerabilities mapped to CWE-913

34 vulnerabilities580% increase year over year

No data

No vulnerability data in CISA KEV for CWE-913

Official definition

ByMitre CWE

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.

Characteristics

Modes of introduction

  • Architecture and Design
  • Implementation

Common consequences

ImpactScopeExplanation
Execute Unauthorized Code or CommandsIntegrity-
Varies by Context, Alter Execution LogicOther, Integrity-

Risk mitigations

  1. Input Validation · ImplementationFor any externally-influenced input, check the input against an allowlist of acceptable values.
  2. Refactoring · Implementation, Architecture and DesignRefactor the code so that it does not need to be dynamically managed.

Detection methods

MethodApproachEffectiveness
FuzzingFuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.High

Representative vulnerabilities

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.