Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, a scope modification vulnerability exists in @nyariv/sandboxjs. The vulnerability allows untrusted sandboxed code to leak internal interpreter objects through the new operator, exposing sandbox scope objects in the scope hierarchy to untrusted code; an unexpected and undesired exploit. While this could allow modifying scopes inside the sandbox, code evaluation remains sandboxed and prototypes remain protected throughout the execution. This vulnerability is fixed in 0.8.36.
Published: 2026-04-06
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: Sandbox Escalation
Action: Apply Patch
AI Analysis

Impact

SandboxJS, a JavaScript sandboxing library, contains a scope modification flaw in versions prior to 0.8.36. The vulnerability is triggered by using the new operator within untrusted sandboxed code, which causes internal interpreter objects to leak through the scope hierarchy. While the sandbox still disallows direct execution of arbitrary code and protects prototypes, the exposed scope objects enable attackers to modify or introspect the sandbox’s internal state, potentially leading to information leakage or unintended behavior within the confined environment.

Affected Systems

The flaw affects the nyariv SandboxJS library before version 0.8.36. Users deploying any iteration of the library older than this release should identify the specific version in use and whether sandboxed code is executed in that environment.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.9, indicating a moderate severity level. No EPSS data is provided, and the issue is not listed in the CISA KEV catalog. An attacker must be able to run code inside the SandboxJS environment to exploit the bug; however, because the library is designed to isolate untrusted scripts, the primary risk is that a developer who accepts third‑party code might inadvertently allow state manipulation within the sandbox. The exploitation path is straightforward once the new operator is available within the sandboxed context, with no additional prerequisites reported.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the SandboxJS library to version 0.8.36 or later to eliminate the scope leakage issue.

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-hg73-4w7g-q96w SandboxJS: Sandbox Escape via Prop Object Leak in New Handler
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 16:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, '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, a scope modification vulnerability exists in @nyariv/sandboxjs. The vulnerability allows untrusted sandboxed code to leak internal interpreter objects through the new operator, exposing sandbox scope objects in the scope hierarchy to untrusted code; an unexpected and undesired exploit. While this could allow modifying scopes inside the sandbox, code evaluation remains sandboxed and prototypes remain protected throughout the execution. This vulnerability is fixed in 0.8.36.
Title SandboxJS has a Sandbox Escape via Prop Object Leak in New Handler
Weaknesses CWE-668
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Nyariv Sandboxjs
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-06T15:40:46.653Z

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

Link: CVE-2026-34217

cve-icon Vulnrichment

Updated: 2026-04-06T15:34:12.211Z

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-34217

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses