CVE-2026-25587

SandboxJS has a Sandbox Escape

Published Feb 6, 2026 CVSS 3.1 · 10 Critical EPSS < 1% KEV · Not listed
Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, 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. This vulnerability is fixed in 0.8.29.

Analysis

AI-generated

Technical impact

SandboxJS is a JavaScript sandboxing library that protects untrusted code by limiting prototype access. The flaw exists in versions prior to 0.8.29 where Map is marked as a safe prototype and its prototype can be obtained via Map.prototype. Untrusted code can overwrite the has function on this prototype, allowing the sandbox to be breached and arbitrary code to run outside the intended boundary. This results in a complete loss of isolation, giving attackers the ability to read or modify privileged data and execute further malicious code, which compromises confidentiality, integrity, and availability of the host application.

Affected Systems

The product affected is SandboxJS by nyariv, commonly used in Node.js applications. All releases before 0.8.29 are vulnerable; version 0.8.29 and later include the fix. Any application that imports a pre‑0.8.29 build of the library is at risk, regardless of the host platform, provided Node.js is used.

Risk and Exploitability

The CVSS score of 10 denotes critical severity. Although the EPSS score of less than 1% indicates current exploitation activity is low and the vulnerability is not listed in the CISA KEV catalog, the high impact means that any exposure to untrusted JavaScript offers a straightforward attack path. Attackers can trigger the escape simply by redefining Map.prototype.has within the sandboxed context, with no need for additional privileges. Consequently, the risk remains high until the library is updated or mitigated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the SandboxJS library to version 0.8.29 or newer to apply the official fix.
  • If upgrading is not immediately possible, enforce prototype immutability by freezing or sealing the Map prototype before sandbox initialization to prevent overwrite of has.
  • As a temporary measure, restrict the execution of untrusted JavaScript that could reach Map.prototype.has, for example by disabling dynamic code generation features or validating input before sandboxing.

Generated by OpenCVE AI on April 17, 2026 at 22:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-66h4-qj4x-38xp @nyariv/sandboxjs has a Sandbox Escape vulnerability
History
Type Values Removed Values Added
CPEs cpe:2.3:a:nyariv:sandboxjs:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
First Time appeared Nyariv
Nyariv sandboxjs
Vendors & Products Nyariv
Nyariv sandboxjs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, 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. This vulnerability is fixed in 0.8.29.
Title SandboxJS has a Sandbox Escape
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 6, 2026, 8:19 PM
Reserved
Feb 3, 2026, 1:02 AM
Status
Analyzed
Published
Feb 6, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:24 AM