Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-93687-braces — Independent measurement harness verifying CVE-2026-93687: reproduces cold-process stack exhaustion in braces 3.0.3 under the default maxLength and tests mitigations. | Kitploit
Tools/GitHubGitHub/canmenzo/cve-2026-93687-braces
Static AnalysisVulnerability AnalysisFuzzingPapers & ResearchLearning & Education
GitHubcanmenzo/cve-2026-93687-braces

cve-2026-93687-braces

Independent measurement harness verifying CVE-2026-93687: reproduces cold-process stack exhaustion in braces 3.0.3 under the default maxLength and tests mitigations.

Share
View Repository
126 days agoNot yet reviewed

CVE-2026-93687 / GHSA-vfj7-8cjw-p6xm: an independent check

This repo verifies, with measurements, the claim in CVE-2026-93687 (GHSA-vfj7-8cjw-p6xm) that the npm package braces at version 3.0.3 and below is vulnerable to "stack exhaustion through deeply nested patterns" (CWE-674, uncontrolled recursion). The advisory lists no patched version.

This is a verify repo, not a patch repo. It does not fork or fix braces. It pins the exact affected versions, drives every public entry point, and reports numbers.

What the CVE claims

Deeply nested brace patterns (for example {a,{a,{a,...}}} or {{{...}}}) drive recursive functions in braces past the call stack limit, throwing RangeError: Maximum call stack size exceeded and crashing the process. The advisory references point at the recursive code in lib/compile.js (L49-53), lib/expand.js (L102-105) and lib/parse.js (L38-40) of braces 3.0.3.

What the maintainer says

In micromatch/braces issue #70 the maintainer (jonschlinkert, 2026-10-05) called it "complete nonsense" and made three points:

  1. A nesting depth of 5,000 needs at least 10,001 characters, so setting maxLength below that is all that is needed, and is already supported.
  2. Do not let users define globs or regexes, the same rule as never letting users write raw SQL. If you do not, "this CVE describes how you would attack yourself."
  3. A maxDepth option would not solve glob DoS in general: glob patterns are regular expressions, negation forces the engine to build and invert a DFA, and that state space can blow up exponentially (the star height problem).

Upstream has collected twelve fix PRs since the issue opened (#72 through #89), five still open, all variations on bounding nesting depth. None is merged.

What we measured

Machine: Apple Mac mini (Mac16,10), arm64, macOS 25.6 (Darwin 25.6.0). Node: v26.8.1. braces 3.0.3, micromatch 4.0.8, fast-glob 3.3.1, exact pins.

Two facts about braces shape everything:

  • The default maxLength (lib/constants.js MAX_LENGTH) is 10000 characters, not the 65536 of older releases. It was lowered to 10000 in upstream PR #40 (2024).
  • lib/parse.js sets the effective cap to Math.min(MAX_LENGTH, opts.maxLength). So maxLength can only lower the 10000 cap, never raise or disable it. braces will not accept an input longer than 10000 characters. parse is also iterative (an explicit stack array), so it never recurses and never overflows; the recursion lives in expand and compile.

The question is therefore whether a pattern of 10000 characters or fewer nests deeply enough to overflow the recursive expand/compile. The answer depends on whether the call is cold or warm, and this matters a lot:

  • Cold means a fresh process making the call for the first time, before the JIT optimizes the recursive functions. Un-optimized frames are larger, so the stack overflows at a shallower depth. This is what a long-running server hits on its first malicious request.
  • Warm means the same function called many times in an already-running process, after the JIT has shrunk the frames, so it survives deeper.

Each probe below therefore runs in its own fresh node process (repro/child.mjs via spawnSync): one build, one call, print the outcome. The warm column repeats the same search inside a single process, to show the gap. Outcomes: stack (a caught RangeError), guarded (the length guard rejected it first), other (a different caught error, e.g. V8 "regex too large"), ok.

Shapes: commaNested = {a,{a,...}} (about 4 chars per level), braceNested = {{{...a...}}} (about 2 per level), rangeNested = {1..2,{1..2,...}} (about 7 per level). maxLength default = 10000.

entry pointshapecold break depthpattern lencoldwarm
braces()commaNested250010001guardedguarded@2500
braces()braceNested35107021stackguarded@5000
braces()rangeNested142910007guardedguarded@1429
braces.expand()commaNested250010001guardedguarded@2500
braces.expand()braceNested39847969stackguarded@5000
braces.expand()rangeNested142910007guardedguarded@1429
braces.compile()braceNested~3500~7000stack (edge)guarded@5000
braces.parse()braceNested500010001guardedguarded@5000
micromatch()commaNested565322613other (regex too large)same
micromatch()braceNested1638332767other (regex too large)same
micromatch()rangeNested936265538guardedsame
micromatch.isMatch()braceNested1638332767other (regex too large)same
fast-glob.generateTasks()braceNested~3976~7953stack (edge)guarded@5000
fast-glob.sync()braceNested128257other (benign glob Error)same
(all braces/fast-glob)commaNested / rangeNested2500 / 1429~10000guardedguarded

Reading the table:

  • Cold, with default options and the default stack, braces() and braces.expand() overflow the stack on the brace shape at a pattern length of about 7000 to 8000 characters, well under the 10000 cap. This is deterministic across repeated fresh runs (confirmed 5 of 5 at depth 4000, len 8001, for both). The compile path and fast-glob.generateTasks sit at the same cold threshold band (about depth 3500 to 4000); right at the edge the exact depth wobbles a few hundred between runs, but a few hundred deeper it is a reliable crash.
  • Warm, the same brace pattern does not overflow: the JIT shrinks the frames enough that the recursion reaches the 10000 length guard first (guarded@5000). This is why a naive in-process benchmark hides the bug. Measuring cold is the point.
  • The comma and range shapes do not crash even cold: at 4 and 7 characters per level the 10000 cap limits them to depth 2500 and 1429, below the cold overflow threshold, so the guard wins. The maintainer's "depth 5000 needs 10001 chars" is a comma-shape statement and is correct for that shape; the brace shape is the one that fits a crashing depth inside the cap.
  • braces.parse() never overflows (it is iterative), on any shape.
  • micromatch never stack-overflows. It has its own guard (picomatch MAX_LENGTH = 65536) and does its own brace handling; below that cap it builds a regex so large that V8 throws a catchable SyntaxError: Invalid regular expression ... too large. The long pattern is not forwarded into a braces stack overflow. picomatch is a different package from braces.
  • fast-glob.sync() (a real glob on a temp dir) is not the DoS vector: it throws an ordinary, catchable Error very early (depth 128), not a stack overflow. The pattern-parsing path generateTasks is the one that can reach the recursion.

In every crashing case the overflow is a RangeError that a surrounding try/catch catches; the child process prints its outcome and exits 0, so it is a thrown error, not an uncatchable abort. There is no data exposure and no code execution.

The recursion is genuinely unbounded

expand/compile accept an AST object directly, bypassing the length guard. A hand-built nested AST overflows at whatever depth the stack allows (about 6200 on the default stack warm, higher with --stack-size larger, lower with it smaller). So the recursion itself has no bound; the only thing standing between it and a crash is the 10000 character input cap, and on the brace shape that cap is not enough cold.

Smallest safe maxLength

Measured cold, per shape, the first crashing length and the maxLength that rejects it:

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    732
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    506
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    405
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    342
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    261
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259

Explore all tools

Browse our collection of tools

View all tools →