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

Impact

A stack overflow occurs in the SandboxJS parser when it encounters deeply nested expressions during evaluation, causing a RangeError that terminates the Node.js process. The flaw is a classic instance of uncontrolled recursion as classified by CWE-674 and results in service disruption for any process that processes untrusted input through SandboxJS.

Affected Systems

The vulnerability affects the Nyariv SandboxJS library prior to version 0.8.36. Any Node.js application that loads this library and parses user-supplied input is susceptible.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate severity. No EPSS data is available, and the issue is not listed in the CISA KEV catalog. An attacker can exploit the flaw by sending a crafted payload containing a large number of nested parentheses or similar constructs, forcing the parser to recurse until the maximum call stack size is exceeded.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the npm package to @nyariv/sandboxjs@0.8.36 or newer.
  • Restrict or sanitize input to prevent deeply nested expressions before passing them to the parser.
  • Monitor Node.js processes for unexpected Termination (RangeError) and apply the patch as soon as possible.

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-8pfc-jjgw-6g26 SandboxJS: Stack overflow DoS via deeply nested expressions in recursive descent parser
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 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-06T15:10:42.261Z

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

Link: CVE-2026-34211

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-34211

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses