Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112366 Overview
CVE-2026-112366 is a regular expression denial of service (ReDoS) vulnerability in Picomatch versions through 4.0.7. The flaw resides in the analyzeRepeatedExtglob function in lib/parse.js, which fails to flag single-branch repeated extglob patterns such as +(*) or +(*a). When Picomatch compiles these patterns into regular expressions, matching against short crafted input strings triggers exponential backtracking. Attackers can block the Node.js event loop and deny service to any application that passes untrusted globs to Picomatch. The vulnerability is categorized under CWE-1333: Inefficient Regular Expression Complexity.
Critical Impact
Remote, unauthenticated attackers can stall Node.js applications by submitting crafted glob patterns that cause catastrophic backtracking in the compiled regular expression.
Affected Products
- Picomatch versions up to and including 4.0.7
- Node.js applications that pass user-controlled globs to Picomatch
- Downstream packages depending on Picomatch (including micromatch and tooling built on it)
Discovery Timeline
- 2026-10-19 - CVE-2026-112366 published to the National Vulnerability Database
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112366
Vulnerability Analysis
Picomatch converts glob syntax into JavaScript regular expressions. Extended glob (extglob) operators such as +(...), *(...), and @(...) accept one or more alternation branches. The analyzeRepeatedExtglob routine in lib/parse.js detects patterns prone to catastrophic backtracking and rewrites or rejects them. The analyzer only inspects extglobs that contain multiple branches separated by |. Single-branch forms like +(*) or +(*a) bypass the check entirely and compile to regular expressions containing nested quantifiers.
When the resulting regular expression matches a short failing input, the regex engine explores an exponential number of ways to partition the string across the nested quantifiers. CPU usage spikes and the Node.js event loop stalls, blocking all other request handling in the process. See the vulnerable code at the GitHub Code Reference and the fix in GitHub Pull Request #194.
Root Cause
The analyzer in analyzeRepeatedExtglob only treats multi-branch repeated extglobs as dangerous. Single-branch patterns such as +(*) reach the regex compiler unchecked and produce nested quantifiers equivalent to (.*)+, which exhibit exponential backtracking against non-matching inputs.
Attack Vector
Any application that passes attacker-controlled strings to Picomatch APIs such as picomatch(), picomatch.isMatch(), or picomatch.makeRe() is exposed. Typical exposure points include web servers that accept filter expressions, build tools processing user-supplied configuration, and SaaS platforms that let tenants define file selectors. A single HTTP request carrying a pattern like +(*) and a crafted test string is sufficient to freeze the worker. The VulnCheck Advisory on Picomatch documents reproduction details.
Detection Methods for CVE-2026-112366
Indicators of Compromise
- Node.js worker processes with sustained 100% CPU on a single core and an unresponsive event loop
- Request logs containing glob-like payloads such as +(*), +(*a), *(*), or @(*) in parameters that feed pattern matching
- Health-check timeouts, dropped keep-alive connections, or load-balancer failovers correlating with inbound requests containing extglob syntax
Detection Strategies
- Perform software composition analysis (SCA) across package-lock.json and yarn.lock files to identify direct and transitive dependencies on Picomatch at or below 4.0.7.
- Instrument Node.js services with event-loop lag metrics such as perf_hooks.monitorEventLoopDelay and alert when latency exceeds normal baselines.
- Add web application firewall (WAF) rules that inspect query strings and JSON bodies for repeated extglob operators submitted by untrusted clients.
Monitoring Recommendations
- Forward Node.js process metrics and application logs to a centralized analytics platform to correlate CPU spikes with request payloads.
- Track dependency drift in CI/CD pipelines and fail builds that pin vulnerable Picomatch versions.
- Monitor upstream advisories from the Picomatch and micromatch maintainers for additional ReDoS disclosures affecting the parser.
How to Mitigate CVE-2026-112366
Immediate Actions Required
- Inventory all applications and container images using Picomatch 4.0.7 or earlier, including transitive dependencies pulled in by micromatch, chokidar, and bundlers.
- Upgrade to the patched Picomatch release that incorporates GitHub Pull Request #194 and rebuild downstream artifacts.
- Reject or sanitize user-supplied glob patterns at the API boundary until patched versions are deployed.
Patch Information
The fix extends analyzeRepeatedExtglob to also flag single-branch repeated extglobs. Upgrade Picomatch to the version containing the merged pull request and refresh lockfiles so transitive consumers resolve the patched release. Review the VulnCheck Advisory on Picomatch for the exact fixed version.
Workarounds
- Validate incoming pattern strings against an allowlist of safe glob syntax and reject patterns containing +(, *(, or @( from untrusted sources.
- Enforce a maximum pattern length and a maximum input string length before invoking Picomatch APIs.
- Execute pattern matching in a worker thread with a strict execution timeout so a single malicious request cannot stall the main event loop.
# Configuration example
npm ls picomatch
npm update picomatch
npm audit --production
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

