Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, the @nyariv/sandboxjs parser contains unbounded recursion in the restOfExp function and the lispify/lispifyExpr call chain. An attacker can crash any Node.js process that parses untrusted input by supplying deeply nested expressions (e.g., ~2000 nested parentheses), causing a RangeError: Maximum call stack size exceeded that terminates the process. This vulnerability is fixed in 0.8.36.
Published: 2026-04-06
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Patch Now
AI Analysis

Impact

SandboxJS is a JavaScript sandboxing library that, before version 0.8.36, contains unbounded recursion in its parser. An attacker can submit deeply nested expressions (for example, about 2000 levels of parentheses) that cause the restOfExp function to recurse without limit. The stack overflow results in a RangeError: Maximum call stack size exceeded and terminates the Node.js process, interrupting any service that relies on the library. This weakness corresponds to uncontrolled recursion leading to stack overflow (CWE‑674).

Affected Systems

All installations of the @nyariv/sandboxjs package with a version earlier than 0.8.36 that parse untrusted JavaScript expressions are affected. The vulnerability is fixed in version 0.8.36 and later.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.9, indicating moderate severity, and an EPSS score of less than 1%, suggesting a low likelihood of exploitation. It is not listed in the CISA KEV catalog. An attacker only needs to provide malformed input that reaches the parser; no additional privileges or remote code execution are required. If the application uses the vulnerable sanitizer in a publicly reachable context, repeated use can lead to repeated crashes and downtime.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply @nyariv/sandboxjs version 0.8.36 or later to eliminate the unbounded recursion bug
  • Implement input validation or size limits to reject expressions that are excessively nested or large before they are passed to the parser
  • Verify that no older versions remain in the dependency tree and monitor Node.js processes for unexpected crashes

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8pfc-jjgw-6g26 SandboxJS: Stack overflow DoS via deeply nested expressions in recursive descent parser
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 15:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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


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 15:30:00 +0000

Type Values Removed Values Added
Description SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, the @nyariv/sandboxjs parser contains unbounded recursion in the restOfExp function and the lispify/lispifyExpr call chain. An attacker can crash any Node.js process that parses untrusted input by supplying deeply nested expressions (e.g., ~2000 nested parentheses), causing a RangeError: Maximum call stack size exceeded that terminates the process. This vulnerability is fixed in 0.8.36.
Title SandboxJS: Stack overflow DoS via deeply nested expressions in recursive descent parser
Weaknesses CWE-674
References
Metrics cvssV4_0

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


Subscriptions

Nyariv Sandboxjs
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-07T14:09:53.356Z

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

Link: CVE-2026-34211

cve-icon Vulnrichment

Updated: 2026-04-07T14:09:47.157Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-04-09T18:05:21.810

Link: CVE-2026-34211

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses