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: n/a
KEV: No
Impact: Code Execution
Action: Immediate Patch
AI Analysis

Impact

SandboxJS is a JavaScript sandboxing library that previously prevented direct assignment to host global objects such as Math.random. The vulnerability allows bypassing this protection through the exposed constructor path, specifically using this.constructor.call to invoke the internal SandboxGlobal function. This attack grants the ability to write arbitrary properties into host global objects and persist those mutations across all sandbox instances in the same process, effectively enabling code execution within the host environment. The weakness corresponds to the Common Weakness Enumeration identifiers CWE-693 and CWE-915, indicating improper restriction of operations and inadequate safeguard against critical data manipulation, respectively.

Affected Systems

The vulnerability affects the nyariv:SandboxJS library in all releases before version 0.8.36. Users running these earlier versions are at risk when processing untrusted JavaScript within the sandbox.

Risk and Exploitability

The CVSS score of 10 signals a maximum severity, but no EPSS score is reported, indicating insufficient data on current exploit frequency. The vulnerability is not listed in CISA’s KEV catalog. Executing attacker-supplied JavaScript that leverages this constructor call path can modify global objects, but requires code to run within the same process as the sandbox. The likely attack vector is the execution of untrusted JavaScript code within a vulnerable SandboxJS environment. Given the high severity and the potential for persistent tampering, the risk is considerable.

Generated by OpenCVE AI on April 6, 2026 at 17:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SandboxJS to version 0.8.36 or later.

Generated by OpenCVE AI on April 6, 2026 at 17:38 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

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 : Received

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

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

Link: CVE-2026-34208

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-06T21:32:27Z

Weaknesses