CWE-913: Improper Control of Dynamically-Managed Code Resources
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.
Consequences
- Integrity: Execute Unauthorized Code or Commands
- Other, Integrity: Varies by Context, Alter Execution Logic
How to prevent it
- Implementation: For any externally-influenced input, check the input against an allowlist of acceptable values.
- Implementation, Architecture and Design: Refactor the code so that it does not need to be dynamically managed.
Recent advisories
- GHSA-pq68-rvw4-xp4r — vm2 contains a sandbox escape vulnerability
- GHSA-wjwh-qqvp-g4p4 — vm2 sandbox escape via WebAssembly.compileStreaming Promise species bypass
- GHSA-88hf-g992-jg85 — vm2: Sandbox Escape (NodeVM)
- GHSA-3vgf-8m4q-q4qr — vm2: Default VM can mutate host TypedArray and ArrayBuffer intrinsics after the host-prototype pollution fix
- GHSA-j3hm-6rg5-mchv — vm2: NodeVM `require.external` without an explicit `require.root` grants unrestricted host filesystem access and full RCE
- GHSA-27g9-p43v-cw3v — vm2 sandbox escape on Node.js 26 through a stale PromiseThenLookupChain protector
- GHSA-8hr7-r645-pc6w — vm2: NodeVM nesting guard accepts array-shaped require and permits host RCE
- GHSA-cfcw-xp6x-25gj — vm2: Sandbox Breakout Using Dangerous Host Proto Mutators
- GHSA-6j2x-vhqr-qr7q — vm2 sandbox escape via JSPI-backed Promise `.finally()` species bypass
- GHSA-m4wx-m65x-ghrr — vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE
- GHSA-76w7-j9cq-rx2j — vm2 is Vulnerable to Sandbox Breakout Through Promise Species
- GHSA-v6mx-mf47-r5wg — vm2 has a Sandbox Escape issue
- GHSA-9mqq-jqxf-grvw — PraisonAI MCP `tools/call` path-traversal => RCE via Python `.pth` injection
- GHSA-wxxx-gvqv-xp7p — LiteLLM has a sandbox escape in custom-code guardrail
- GHSA-6cqr-8cfr-67f8 — n8n Has Expression Escape Vulnerability Leading to RCE
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor