VYPR
Critical severityOSV Advisory· Published Feb 2, 2026· Updated Feb 4, 2026

SandboxJS Prototype Pollution -> Sandbox Escape -> RCE

CVE-2026-25142

Description

SandboxJS is a JavaScript sandboxing library. Prior to 0.8.27, SanboxJS does not properly restrict __lookupGetter__ which can be used to obtain prototypes, which can be used for escaping the sandbox / remote code execution. This vulnerability is fixed in 0.8.27.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
@nyariv/sandboxjsnpm
< 0.8.270.8.27

Affected products

1

Patches

1
75c8009db32e

fix(security): harden sandbox against code execution bypass (GHSA-9p4w-fq8m-2hp7)

3 files changed · +14 2
  • package.json+1 1 modified
    @@ -1,6 +1,6 @@
     {
       "name": "@nyariv/sandboxjs",
    -  "version": "0.8.26",
    +  "version": "0.8.27",
       "description": "Javascript sandboxing library.",
       "main": "dist/node/Sandbox.js",
       "module": "./build/Sandbox.js",
    
  • src/executor.ts+3 1 modified
    @@ -377,7 +377,9 @@ addOps(LispType.Prop, (exec, done, ticks, a, b: string, obj, context, scope) =>
               throw new SandboxError(`Static method or property access not permitted: ${a.name}.${b}`);
             }
           }
    -    } else if (b !== 'constructor') {
    +    }
    +    
    +    if (b !== 'constructor') {
           let prot = a;
           while ((prot = Object.getPrototypeOf(prot))) {
             if (prot.hasOwnProperty(b)) {
    
  • test/tests.json+10 0 modified
    @@ -230,6 +230,16 @@
         "evalExpect": "error",
         "safeExpect": "/Method or property access not permitted/"
       },
    +  {
    +    "code": "(() => {}).__defineGetter__('a', () => 1 ) || 'ok'",
    +    "evalExpect": "error",
    +    "safeExpect": "/Method or property access not permitted/"
    +  },
    +  {
    +    "code": "({}).toString.__defineGetter__('a', () => 1 ) || 'ok'",
    +    "evalExpect": "error",
    +    "safeExpect": "/Method or property access not permitted/"
    +  },
       {
         "code": "!test2",
         "evalExpect": false,
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.