Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-33671

Picomatch has a ReDoS vulnerability via extglob quantifiers
Back to all
CVE

CVE-2026-33671

Picomatch has a ReDoS vulnerability via extglob quantifiers

Impact

picomatch is vulnerable to Regular Expression Denial of Service (ReDoS) when processing crafted extglob patterns. Certain patterns using extglob quantifiers such as +() and *(), especially when combined with overlapping alternatives or nested extglobs, are compiled into regular expressions that can exhibit catastrophic backtracking on non-matching input.

Examples of problematic patterns include +(a|aa)+(*|?)+(+(a))*(+(a)), and +(+(+(a))). In local reproduction, these patterns caused multi-second event-loop blocking with relatively short inputs. For example, +(a|aa) compiled to ^(?:(?=.)(?:a|aa)+)$ and took about 2 seconds to reject a 41-character non-matching input, while nested patterns such as +(+(a)) and *(+(a)) took around 29 seconds to reject a 33-character input on a modern M1 MacBook.

Applications are impacted when they allow untrusted users to supply glob patterns that are passed to picomatch for compilation or matching. In those cases, an attacker can cause excessive CPU consumption and block the Node.js event loop, resulting in a denial of service. Applications that only use trusted, developer-controlled glob patterns are much less likely to be exposed in a security-relevant way.

Patches

This issue is fixed in picomatch 4.0.4, 3.0.2 and 2.3.2.

Users should upgrade to one of these versions or later, depending on their supported release line.

Workarounds

If upgrading is not immediately possible, avoid passing untrusted glob patterns to picomatch.

Possible mitigations include:

  • disable extglob support for untrusted patterns by using noextglob: true
  • reject or sanitize patterns containing nested extglobs or extglob quantifiers such as +() and *()
  • enforce strict allowlists for accepted pattern syntax
  • run matching in an isolated worker or separate process with time and resource limits
  • apply application-level request throttling and input validation for any endpoint that accepts glob patterns

Resources

  • Picomatch repository: https://github.com/micromatch/picomatch
  • lib/parse.js and lib/constants.js are involved in generating the vulnerable regex forms
  • Comparable ReDoS precedent: CVE-2024-4067 (micromatch)
  • Comparable generated-regex precedent: CVE-2024-45296 (path-to-regexp)

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Related Resources

No items found.

References

https://github.com/micromatch/picomatch/security/advisories/GHSA-c2c7-rcm5-vvqj, https://nvd.nist.gov/vuln/detail/CVE-2026-33671, https://github.com/micromatch/picomatch/commit/5eceecd27543b8e056b9307d69e105ea03618a7d, https://github.com/micromatch/picomatch

Severity

7.5

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.5
EPSS Probability
0.0002%
EPSS Percentile
0.05834%
Introduced Version
4.0.0,3.0.0,1.2.0,0
Fix Available
4.0.4,3.0.2,2.3.2,2.333.1-r1,3.6.19-r5,4.0.3-r2,4.112.0-r2,5.0.5-r1,0.35.3-r0,8.17.10-r16,8.19.14-r1,9.0.8-r17,9.1.10-r10,9.2.7-r3,9.3.5-r0,2.16.0-r11,2.95.12-r17,2.95.12-r20,3.163.0-r0,9.0.7-r2,12.2.0-r2,11.12.1-r0,2.19.5-r3,2.19.5-r4,3.5.0-r11,3.5.0-r8,5.14.3-r13,3.229.0-r0,1.2.3-r8,43.104.7-r1,1.6.0-r0,5.5.0-r11,8.0.11-r0,22.0.4-r9,23.0.3-r12,4.14.4-r1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading