Update dependency picomatch to v4.0.4 [SECURITY]#47787
Merged
Conversation
Contributor
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
tbradsha
approved these changes
Mar 25, 2026
Contributor
tbradsha
left a comment
There was a problem hiding this comment.
Should be fine if CI is happy.
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.0.2→4.0.4GitHub Vulnerability Alerts
CVE-2026-33671
Impact
picomatchis 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
picomatchfor 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:
noextglob: true+()and*()Resources
lib/parse.jsandlib/constants.jsare involved in generating the vulnerable regex formsmicromatch)path-to-regexp)CVE-2026-33672
Impact
picomatch is vulnerable to a method injection vulnerability (CWE-1321) affecting the
POSIX_REGEX_SOURCEobject. Because the object inherits fromObject.prototype, specially crafted POSIX bracket expressions (e.g.,[[:constructor:]]) can reference inherited method names. These methods are implicitly converted to strings and injected into the generated regular expression.This leads to incorrect glob matching behavior (integrity impact), where patterns may match unintended filenames. The issue does not enable remote code execution, but it can cause security-relevant logic errors in applications that rely on glob matching for filtering, validation, or access control.
All users of affected
picomatchversions that process untrusted or user-controlled glob patterns are potentially impacted.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:
Sanitizing or rejecting untrusted glob patterns, especially those containing POSIX character classes like
[[:...:]].Avoiding the use of POSIX bracket expressions if user input is involved.
Manually patching the library by modifying
POSIX_REGEX_SOURCEto use a null prototype:Resources
Release Notes
micromatch/picomatch (picomatch)
v4.0.4Compare Source
This is a security release fixing several security relevant issues.
What's Changed
Full Changelog: micromatch/picomatch@4.0.3...4.0.4
v4.0.3Compare Source
What's Changed
constructorby @Jason3S in #144New Contributors
Full Changelog: micromatch/picomatch@4.0.2...4.0.3
Configuration
📅 Schedule: Branch creation - "" in timezone UTC, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.