CVE-2026-25881

9.0 CRITICAL

📋 TL;DR

This CVE describes a sandbox escape vulnerability in SandboxJS library versions before 0.8.31. It allows sandboxed JavaScript code to bypass isolation protections and modify host-side built-in prototypes, potentially leading to prototype pollution attacks. Applications using vulnerable SandboxJS versions for JavaScript sandboxing are affected.

💻 Affected Systems

Products:
  • SandboxJS
Versions: All versions prior to 0.8.31
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using SandboxJS for JavaScript sandboxing. The vulnerability exists in the library's isolation mechanism.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution (RCE) on the host system through prototype pollution leading to command execution via sensitive sinks like execSync.

🟠

Likely Case

Prototype pollution enabling privilege escalation, data manipulation, or denial of service within the application context.

🟢

If Mitigated

Limited impact if sandboxed code has minimal privileges and no sensitive sinks are exposed.

🌐 Internet-Facing: HIGH - Applications exposing sandboxed JavaScript execution to untrusted users are directly vulnerable.
🏢 Internal Only: MEDIUM - Internal applications using sandboxed code from trusted sources have reduced but still significant risk.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof of concept exists in the security advisory. Exploitation requires the ability to execute JavaScript within the sandbox.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.8.31

Vendor Advisory: https://github.com/nyariv/SandboxJS/security/advisories/GHSA-ww7g-4gwx-m7wj

Restart Required: Yes

Instructions:

1. Update SandboxJS dependency to version 0.8.31 or later. 2. Update package.json to specify 'sandboxjs': '>=0.8.31'. 3. Run npm update or yarn update. 4. Restart the application.

🔧 Temporary Workarounds

Disable sandboxed JavaScript execution

all

Temporarily disable or remove SandboxJS functionality until patching is possible.

Comment out or remove SandboxJS initialization and usage in application code

Implement input validation

all

Add strict validation and sanitization of all JavaScript code before passing to SandboxJS.

Implement whitelist validation for allowed JavaScript operations

🧯 If You Can't Patch

  • Isolate the application in a container or VM with minimal privileges
  • Implement network segmentation to limit potential lateral movement

🔍 How to Verify

Check if Vulnerable:

Check package.json or node_modules for SandboxJS version below 0.8.31

Check Version:

npm list sandboxjs | grep sandboxjs

Verify Fix Applied:

Verify SandboxJS version is 0.8.31 or higher in package.json and node_modules

📡 Detection & Monitoring

Log Indicators:

  • Unusual JavaScript execution patterns
  • Prototype modification attempts in sandbox context

Network Indicators:

  • Unexpected outbound connections from application after sandbox execution

SIEM Query:

source="application_logs" AND ("sandboxjs" OR "prototype") AND ("error" OR "unusual")

🔗 References

📤 Share & Export