CVE-2026-33671: Picomatch has a ReDoS vulnerability via extglob quantifiers

Published Mar 25, 2026
·
Updated

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)

Other sources

Picomatch has a ReDoS vulnerability via extglob quantifiers

Microsoft

Picomatch is a glob matcher written JavaScript. Versions prior to 4.0.4, 3.0.2, and 2.3.2 are 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. 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. 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. If upgrading is not immediately possible, avoid passing untrusted glob patterns to picomatch. Possible mitigations include disabling extglob support for untrusted patterns by using noextglob: true, rejecting or sanitizing patterns containing nested extglobs or extglob quantifiers such as +() and (), enforcing strict allowlists for accepted pattern syntax, running matching in an isolated worker or separate process with time and resource limits, and applying application-level request throttling and input validation for any endpoint that accepts glob patterns.

MITRE

Affected Software

9 affected componentsFixes available
npm/picomatch<2.3.2
2.3.2
npm/picomatch>=3.0.0<3.0.2
3.0.2
npm/picomatch>=4.0.0<4.0.4
4.0.4
Jonschlinkert Picomatch Node.js<2.3.2
Jonschlinkert Picomatch Node.js>=3.0.0<3.0.2
Jonschlinkert Picomatch Node.js>=4.0.0<4.0.4
Microsoft azl3 nodejs24 24.14.1-1
Microsoft azl3 nodejs 24.14.1-3
IBM watsonx.data intelligence<=5.2.2, 5.3.0, 5.3.1, 5.3.1-patch-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/picomatch to a version that resolves this vulnerability.

    Fixed in 2.3.2
  2. Upgrade

    Upgrade npm/picomatch to a version that resolves this vulnerability.

    Fixed in 3.0.2
  3. Upgrade

    Upgrade npm/picomatch to a version that resolves this vulnerability.

    Fixed in 4.0.4
  4. Upgrade

    Upgrade picomatch to a version that resolves this vulnerability.

    Fixed in 4.0.4
  5. Upgrade

    Upgrade picomatch to a version that resolves this vulnerability.

    Fixed in 3.0.2
  6. Upgrade

    Upgrade picomatch to a version that resolves this vulnerability.

    Fixed in 2.3.2
  7. Configuration

    When compiling/matching glob patterns from untrusted users, disable extglob support by setting `noextglob: true` (prevents processing extglob quantifiers like `+()` and `*()`).

    picomatch noextglob = true
  8. Configuration

    For endpoints that accept glob patterns from untrusted users, reject or sanitize patterns containing nested extglobs or extglob quantifiers such as `+()` and `*()` (examples given: `+(a|aa)`, `+(*|?)`, `+(+(a))`, `*(+(a))`, `+(+(+(a)))`).

    application endpoint(s) using picomatch glob_pattern_validation = reject
  9. Compensating control

    Run glob compilation/matching in an isolated worker or separate process with time and resource limits to prevent catastrophic backtracking from blocking the Node.js event loop.

  10. Compensating control

    Apply application-level request throttling for any endpoint that accepts glob patterns, to reduce the impact of repeated expensive pattern compilations/matches.

Event History

Mar 25, 2026
Advisory Published
via GitHub·09:12 PM
Data Sourced
via GitHub·09:12 PM
DescriptionSeverityWeaknessAffected Software
Mar 26, 2026
CVE Published
via MITRE·09:20 PM
Data Sourced
via MITRE·09:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
RemedyAffected Software
Mar 29, 2026
Data Sourced
via Microsoft·08:03 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:03 AM
SeverityAffected Software
Updated
via Microsoft·08:03 AM
DescriptionSeverity
Jun 24, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-33671?

CVE-2026-33671 has a moderate severity level due to its potential for causing Denial of Service through regular expression exploitation.

2

How do I fix CVE-2026-33671?

To mitigate CVE-2026-33671, upgrade to picomatch version 2.3.2 or 3.0.2 or 4.0.4 as soon as possible.

3

What is the impact of CVE-2026-33671?

The impact of CVE-2026-33671 is that it allows attackers to exploit crafted extglob patterns, resulting in Regular Expression Denial of Service.

4

Which versions of picomatch are affected by CVE-2026-33671?

Versions of picomatch prior to 2.3.2, 3.0.0 to 3.0.2, and 4.0.0 to 4.0.4 are affected by CVE-2026-33671.

5

What should I do if I cannot upgrade to a safe version for CVE-2026-33671?

If upgrading is not an option, consider applying input validation or using alternative libraries to avoid vulnerable patterns.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203