Advisory

GHSA-ww6v-677g-p656

Also known as: CVE-2017-16088

Summary

Sandbox Breakout in safe-eval

Details

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

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2018-07-18 18:28 UTC
Modified
2023-11-08 03:59 UTC

Affected packages and fixes

safe-eval

npm · All systems

Affected

  • introduced 0, last affected 0.3.0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences