Repository navigation
Conversation
|
Technical follow-up review of #260 (author-side validation; not maintainer approval): Targeted mitigation: PASS. Local Two limitations still require review:
The PR is intentionally scoped to single-branch forms. This review is provided to make its limits clear, not to self-approve it or claim the official npm release is patched. No GitHub CI or deploy was run. |
|
See #235 (comment). |
|
Follow-up to the earlier security review: the PR head has been updated to f22674d. The previously reported HIGH multi-branch ReDoS cases +(a|b), +(a|b), and (a|b) are now handled with bounded, semantics-preserving rewrites for simple alternatives. The additional single-branch bracket-class bypasses +([ab]) and +(a[ab]) are also covered. Complex patterns that cannot be rewritten safely use the existing conservative literal fallback. Local isolated QA: npm test 2,006/2,006 PASS, lint PASS, git diff --check PASS; differential matching 843,696 alternative cases, 374,976 bracket-class cases, and 326,585 bracket-literal cases without mismatches in the tested configurations. This does not prove all arbitrary glob patterns are ReDoS-free. capture: true and conservative fallback can intentionally change matches; maintainer review and documentation of that tradeoff remain necessary. No upstream merge, npm release or CONSUBOV dependency update was performed. |
|
Additional author-side review of the current PR head
My recommendation is to keep this PR scoped as an incomplete mitigation, add failing regression tests for these cases, and avoid calling CVE-2026-112366 fully addressed by the current commit. The |
|
Reviewed from the diff; I did not run this branch. For reference, on master (9fab7bf, Node 22) each of
|
VlaSou
left a comment
There was a problem hiding this comment.
Thanks for working on this. This addresses GHSA-fc5q-39xc-vjpf, which currently affects our development toolchain through [email protected]. We can test against this branch, but an official patched release would be preferable to carrying a Git-based override. Could you confirm whether you expect to publish a patched 4.x release after merge, and whether the 2.x line will receive a separate fix?
|
Downstream validation report: Node.js v24.14.1, picomatch 4.0.7. I applied this fix from commit f22674d using pnpm patchedDependencies. With input made from 128 repeated a characters followed by a slash, these non-matching patterns all returned false in a child process with a 2-second timeout: +(*), (), +(*a), (a), +(a), (a), +(a?), x+(*a)y, +(a|b), +(a|b). Selected short-input matching checks also matched the maxExtglobRecursion:false baseline. The package-manager audit still reports GHSA-fc5q-39xc-vjpf for version 4.0.7 because no patched release is published yet. This patch is a useful temporary mitigation, but an official patched 4.x release is needed for downstream consumers to clear the advisory cleanly. Thanks for the fix. |
|
Scope clarification for my downstream report above: the checks covered only the listed patterns and are not a comprehensive ReDoS assessment. They do not cover the nested-extglob and overlapping-quantifier counterexamples reported elsewhere in this PR. I am not treating the advisory as resolved; our audit still reports the vulnerable 4.0.7 version. |
|
any eta to fix ? my cto dont want to approve my PR because of this :'( |
|
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. |
thank you guys, appreciate it <3 |
Summary
Targeted mitigations for repeated extglob ReDoS patterns related to CVE-2026-112366 / GHSA-fc5q-39xc-vjpf. This is not a claim that arbitrary user-controlled globs are safe from catastrophic backtracking.
*when the outer repetition is redundant.*(a*(ba)|a),*(ab*(a)|ab), and*(a*(ba)|A)withnocase: true.maxExtglobRecursion: falsesafeguard opt-out.Latest contribution:
d10c0e5003aabed2d81427dd6c125af50bf920ab. Onlylib/parse.jsandtest/options.maxExtglobRecursion.jsare changed.Local reproduction and tests
Potentially pathological inputs were exercised in timeout-bounded subprocesses; regression tests reproduced the problems before the corresponding local fixes.
On Node 24.22.1, in the isolated VPS checkout:
npm test: 2,023 passing (includes ESLint);git diff --check: PASS.These are scoped local results, not universal security proof or upstream maintainer approval. GitHub-hosted CI was not used as the validation basis.
Known limitations / review required
capture: trueand conservative literal fallback can change matching or capture semantics in certain cases; please review and explicitly decide whether these tradeoffs are acceptable.maxExtglobRecursion: falseintentionally disables the safeguard. The affected v2.x line requires separate assessment.Related: #237, #238, #246 and #247.