Skip to content
OpenAdvisories

Description

Picomatch is a glob matcher written JavaScript. Versions prior to 4.0.4, 3.0.2, and 2.3.2 are vulnerable to a method injection vulnerability affecting the `POSIX_REGEX_SOURCE` object. Because the object inherits from `Object.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 `picomatch` versions that process untrusted or user-controlled glob patterns are potentially impacted. 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 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; and manually patching the library by modifying `POSIX_REGEX_SOURCE` to use a null prototype.

Affected products

VendorProductAffectedFixed
micromatch picomatch >= 4.0.0, < 4.0.4, >= 3.0.0, < 3.0.2, < 2.3.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-anymatch 3.1.3+~cs8.0.6-1 —
Debian 13 node-anymatch No fix yet —
Debian 12 node-anymatch No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS node-anymatch No fix yet —
Ubuntu 25.10 node-anymatch No fix yet —
Ubuntu 24.04 LTS node-anymatch No fix yet —
Ubuntu 22.04 LTS node-anymatch No fix yet —
Ubuntu 20.04 LTS node-anymatch No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS node-anymatch No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 nodejs-nodemon No fix yet —
Azure Linux 3 nodejs24 24.14.1-2 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling argo-workflows-ui-4.0 4.0.3-r2 —
Wolfi rolling code-server 4.112.0-r2 —
Wolfi rolling katib-earlystopping +8 0.19.0-r25 —
Wolfi rolling katib-suggestion-goptuna-compat 0.19.0-r40 —
Wolfi rolling kubeflow-pipelines-frontend 2.16.0-r11 —
Wolfi rolling lerna 9.0.7-r2 —
Wolfi rolling nextcloud-server-33 33.0.6-r1 —
Wolfi rolling node-gyp 12.2.0-r2 —
Wolfi rolling npm 11.12.1-r0 —
Wolfi rolling opensearch-dashboards-3 3.5.0-r11 —
Wolfi rolling prism 5.14.3-r13 —
Wolfi rolling pulumi-language-nodejs 3.229.0-r0 —
Wolfi rolling rancher-api-ui 1.2.3-r8 —
Wolfi rolling renovate 43.104.7-r1 —
Wolfi rolling saf 1.6.0-r0 —
Wolfi rolling sqlpad 7.5.7-r28 —
Wolfi rolling tileserver-gl 5.5.0-r11 —
Wolfi rolling ts-patch 4.0.1-r0 —
Wolfi rolling vite 8.0.11-r0 —
Wolfi rolling vitess-23 23.0.3-r12 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm picomatch >= 4.0.0, < 4.0.4 4.0.4 GHSA-3v7f-55p6-f55p
npm picomatch >= 3.0.0, < 3.0.2 3.0.2 GHSA-3v7f-55p6-f55p
npm picomatch < 2.3.2 2.3.2 GHSA-3v7f-55p6-f55p

Advisories 1

References