Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, SandboxJS blocks direct assignment to global objects (for example Math.random = ...), but this protection can be bypassed through an exposed callable constructor path: this.constructor.call(target, attackerObject). Because this.constructor resolves to the internal SandboxGlobal function and Function.prototype.call is allowed, attacker code can write arbitrary properties into host global objects and persist those mutations across sandbox instances in the same process. This vulnerability is fixed in 0.8.36.
Published: 2026-04-06
Score: 10 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Global object tampering leading to arbitrary code execution
Action: Immediate Patch
AI Analysis

Impact

SandboxJS is a JavaScript sandboxing library that prevents direct assignment to global objects such as Math. However, the library allows a bypass through an exposed constructor call path, using this.constructor.call(target, attackerObject). Because this.constructor resolves to the internal SandboxGlobal function and Function.prototype.call is permitted, attackers can write arbitrary properties into host global objects. These mutations persist across sandbox instances within the same process, effectively allowing the attacker to alter global state, potentially injecting malicious code or leaking data. The weakness aligns with CWE‑693 (Improper handling of input) and CWE‑915 (Improper use of a Function constructor). The impact is full compromise of confidentiality, integrity, and availability for any Node.js process that loads the vulnerable SandboxJS version.

Affected Systems

nyariv SandboxJS versions prior to 0.8.36 used within Node.js applications. No other vendor or product is mentioned, so the scope is limited to projects that incorporate this library directly. The library is typically deployed as a dependency in JavaScript or Node.js projects, so any application that imports SandboxJS and runs untrusted code within the sandbox is at risk.

Risk and Exploitability

The CVSS score of 10 indicates that all impact dimensions are affected. Exploit probability is low, with an EPSS score of less than 1%, suggesting that widespread exploitation has not yet been observed, and the vulnerability is not listed in the CISA KEV catalog. The likely attack requires the ability to execute code inside the sandbox; thus, it is a local or code‑intrusion vector. Once attacker code reaches the sandbox, the constructor bypass can be invoked to escape the sandbox and modify global objects, compromising the entire Node.js process.

Generated by OpenCVE AI on April 9, 2026 at 19:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update SandboxJS to version 0.8.36 or later
  • If an update is not immediately possible, run sandbox instances in isolated processes so that global object changes do not affect other instances
  • Avoid exposing the constructor path to untrusted code
  • Review and restrict code that can be executed within the sandbox
  • Monitor for unexpected property changes on global objects and log sandbox activity

Generated by OpenCVE AI on April 9, 2026 at 19:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2gg9-6p7w-6cpj SandboxJS: Sandbox integrity escape
History

Thu, 09 Apr 2026 18:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:nyariv:sandboxjs:*:*:*:*:*:node.js:*:*

Tue, 07 Apr 2026 00:00:00 +0000

Type Values Removed Values Added
First Time appeared Nyariv
Nyariv sandboxjs
Vendors & Products Nyariv
Nyariv sandboxjs

Mon, 06 Apr 2026 20:00:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 06 Apr 2026 15:30:00 +0000

Type Values Removed Values Added
Description SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, SandboxJS blocks direct assignment to global objects (for example Math.random = ...), but this protection can be bypassed through an exposed callable constructor path: this.constructor.call(target, attackerObject). Because this.constructor resolves to the internal SandboxGlobal function and Function.prototype.call is allowed, attacker code can write arbitrary properties into host global objects and persist those mutations across sandbox instances in the same process. This vulnerability is fixed in 0.8.36.
Title SandboxJS: Sandbox integrity escape
Weaknesses CWE-693
CWE-915
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:L'}


Subscriptions

Nyariv Sandboxjs
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-06T18:39:14.717Z

Reserved: 2026-03-26T15:57:52.324Z

Link: CVE-2026-34208

cve-icon Vulnrichment

Updated: 2026-04-06T18:39:10.583Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-06T16:16:34.580

Modified: 2026-04-09T18:07:20.863

Link: CVE-2026-34208

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-10T09:45:13Z

Weaknesses