Repository navigation
Conversation
|
See #235 (comment). |
|
Reviewed from the diff; I did not run this branch. For reference, on master (9fab7bf, Node 22) each of
|
|
Both GitHub and VulnCheck have withdrawn this advisory, as it is not a security issue. If a tool is still reporting you're "vulnerable", then you need to contact the tool author about getting their source updated. |
|
Thanks for the clarification and for following up on the advisory. GHSA-fc5q-39xc-vjpf is now marked withdrawn because this behavior is not a security issue. We had treated the advisory as valid and proposed a compatibility-breaking workaround; we are reverting that downstream workaround and restoring the upstream picomatch package. I’m closing this PR as unnecessary. Apologies for the noise, and thank you for the review and clarification. |
Repeated extglobs can still compile nested or overlapping unbounded quantifiers in 4.0.7. The existing raw-text checks miss single wildcard branches, normalized alternatives, case folding and configurations that disable the recursion heuristic. Wrapping a validated extglob in raw or escaped/counting quantifiers also reintroduces the issue.
This change applies a mandatory, bounded ambiguity check to the generated token output. A position automaton retains nullable-path multiplicity and parallel edges; a square automaton detects distinct accepting paths. Character classes conservatively cover later ignore-case flag changes. Assertions are bounded and checked before overapproximation, and proof limits fail closed. Final rendered output is checked again when raw operators,
nobraceorunescapecan wrap an extglob.Single-character alternatives become one class. A proven single-star ASCII branch absorbs repeated copies; capture-dependent and Bash dot-segment cases are excluded from that rewrite. Ordinary and safely delimited nested extglobs remain supported. Existing literalization remains where applicable; other ambiguous or unproven repetitions now raise
SyntaxError, even withmaxExtglobRecursion: false. README documents this compatibility change and the trusted raw-RegExp API boundary.Validation:
npm testpasses lint and 2,009 tests. Added isolated-process deadlines, advisory and alternate encodings, arrays/ignore/posix/direct parser entry points, parsed-state flag changes, counted/escaped wrapping quantifiers, captures, unanchored match spans, resource limits and short-input language comparisons. Existing unsafe-pattern expectations were changed to explicit error assertions; no tests were skipped.Addresses CVE-2026-112366 / GHSA-fc5q-39xc-vjpf. Related proposals: #237, #238, #246 and #254. This is a proposed correction, not a claim that an official patched release already exists.