Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXd3NnYtNjc3Zy1wNjU2
Sandbox Breakout in safe-eval
Affected versions of safe-eval
are vulnerable to a sandbox escape. By accessing object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.
Proof of Concept:
This code accesses the process object and calls .exit()
var safeEval = require('safe-eval');
safeEval("this.constructor.constructor('return process')().exit()");
Recommendation
Update to version 0.4.0 or later
Permalink: https://github.com/advisories/GHSA-ww6v-677g-p656JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXd3NnYtNjc3Zy1wNjU2
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: over 6 years ago
Updated: about 1 year ago
CVSS Score: 10.0
CVSS vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Identifiers: GHSA-ww6v-677g-p656, CVE-2017-16088
References:
- https://nvd.nist.gov/vuln/detail/CVE-2017-16088
- https://github.com/hacksparrow/safe-eval/issues/5
- https://github.com/patriksimek/vm2/issues/59
- https://github.com/hacksparrow/safe-eval/pull/13
- https://github.com/advisories/GHSA-ww6v-677g-p656
- https://www.npmjs.com/advisories/337
Blast Radius: 34.4
Affected Packages
npm:safe-eval
Dependent packages: 264Dependent repositories: 2,730
Downloads: 122,955 last month
Affected Version Ranges: <= 0.3.0
No known fixed version
All affected versions: 0.0.0, 0.1.0, 0.2.0, 0.3.0