CVE-2026-33671

Picomatch has a ReDoS vulnerability via extglob quantifiers

Published Mar 26, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is a Regular Expression Denial of Service in picomatch caused by catastrophic backtracking when processing crafted extglob quantifiers such as +() and *(). A malicious or malformed pattern can consume large amounts of CPU and block the Node.js event loop, resulting in an unavailable service. The weakness is a ReDoS issue (CWE‑1333).

Affected Systems

The flaw affects micromatch:picomatch versions prior to 4.0.4, 3.0.2, and 2.3.2. Any Node.js application that accepts glob patterns from users and passes them directly to picomatch is potentially impacted.

Risk and Exploitability

The CVSS score is 7.5 and the EPSS score is less than 1 %, indicating a moderate severity but low likelihood of widespread exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply a crafted pattern to the application, which may be trivial if user input is not validated or sanitized. Once triggered, the attack can cause significant performance degradation and denial of availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade picomatch to version 4.0.4, 3.0.2, or 2.3.2 or later.
  • If upgrading is not immediately possible, disable extglob support for untrusted patterns by passing the option noextglob:true.
  • Reject or sanitize patterns that contain nested extglobs or quantifiers such as +() and *().
  • Implement strict allowlists for accepted pattern syntax.
  • Run glob matching in an isolated worker or separate process with time and resource limits.
  • Apply request throttling and input validation on any endpoint that accepts glob patterns.

Generated by OpenCVE AI on April 2, 2026 at 04:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-c2c7-rcm5-vvqj Picomatch has a ReDoS vulnerability via extglob quantifiers
History
Type Values Removed Values Added
First Time appeared Jonschlinkert
Jonschlinkert picomatch
CPEs cpe:2.3:a:jonschlinkert:picomatch:*:*:*:*:*:node.js:*:*
Vendors & Products Jonschlinkert
Jonschlinkert picomatch
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Micromatch
Micromatch picomatch
Vendors & Products Micromatch
Micromatch picomatch
Type Values Removed Values Added
Description 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.
Title Picomatch has a ReDoS vulnerability via extglob quantifiers
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 27, 2026, 8:00 PM
Reserved
Mar 23, 2026, 4:34 PM
Status
Analyzed
Published
Mar 26, 2026, 10:16 PM
Modified
Jun 17, 2026, 10:37 AM
Severity
Moderate
Public date
Mar 26, 2026, 9:20 PM