Originally created by: Redo-San
Advisory
Summary. braces bounds input character length (MAX_LENGTH = 10000) but not brace
nesting depth. The recursive AST walkers (lib/compile.js, lib/expand.js) exhaust the
call stack on deeply nested patterns (depth ≥ ~3500, within the character cap); the
uncaught RangeError: Maximum call stack size exceeded terminates the Node process
(availability impact / DoS). Attack vector: an untrusted, deeply nested brace pattern.
Why this is deferred
- No patched release exists. Every version ≤ 3.0.3 is affected; upstream has not
shipped a fix (issue opened 2026-09-17, still open as of 2026-10-06).
- Development scope only.
npm audit --omit=dev --audit-level=high exits 0 — the
finding never reaches production. All 10 high findings in the full-scope audit share
one root advisory (GHSA-vfj7-8cjw-p6xm) through micromatch, fast-glob,
chokidar, findup-sync, globby, depcheck, stylelint, workbox-cli,
repomix.
- No attacker-controlled input path. Every glob pattern that reaches
braces is
authored in this repository (tool configs and scripts); none derive from untrusted
input, which is the documented attack vector.
Compensating controls
- Production merge gate
npm run audit:prod (in ci.yml) stays always-hard and blocks
any production high/critical on every PR.
- Weekly
Security Audit workflow (security-audit.yml, cron Mon 03:00) fails on any
high/critical without an exception row — this row is the only allowlist entry and is
re-verified on every scheduled run.
- Scorecard
Vulnerabilities check reads the matching ignore in osv-scanner.toml.
- Dependabot alerts, CodeQL and zizmor keep running; if a patched release appears, the
exception must be removed in the same PR that bumps the dependency.
Review checklist (due 2027-01-04, within 90 days)
- [ ]
npm view braces version — has a patched release landed?
- [ ] GitHub Advisory Database — has
first_patched_version been set on GHSA-vfj7-8cjw-p6xm?
- [ ] If fixed: bump the
overrides/lockfile entry in one PR, remove the row from
security/vulnerability-exceptions.md, close this issue.
- [ ] If still unfixed: re-run the risk assessment and renew the row with a new
next-review date (no auto-renewal).
References
Originally posted by: Redo-San
Scheduled workflow verified green.
cc48cb1): via-chain root resolution in the gate + the deferral row forGHSA-vfj7-8cjw-p6xminsecurity/vulnerability-exceptions.md.76d66e3): theRun npm audit (full scope)step no longer dies on npm's documented findings exit code1; the report shape is validated instead, and the enforce step got the same guard as defense in depth. The 2026-10-05 failure was actually at the collect step, which prevented the policy gate from ever running.main: run 37456067272 —conclusion: success, both steps passed, gate log:No unexcepted high/critical advisories.Next review stays 2027-01-04 (see the checklist in the issue body).
Related
Tickets:
#533Tickets:
#534