Skip to content
OpenAdvisories
Medium · 6.9 CVE-2026-34211 EUVD-2026-19299GHSA-8pfc-jjgw-6g26

SandboxJS: Stack overflow DoS via deeply nested expressions in recursive descent parser

Published Apr 6, 2026 · Updated Apr 7, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
nyariv SandboxJS < 0.8.36 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm @nyariv/sandboxjs < 0.8.36 0.8.36 GHSA-8pfc-jjgw-6g26

References