Vulnerabilities in pkg:npm/picomatch
PACKAGECVE-2026-33672 is a MODERATE (CVSS 5.3) method injection vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Picomatch libraries in the npm ecosystem. The issue involves method injection in posix character classes causes incorrect glob matching. Remediation is available by upgrading affected packages to version 4.0.4, 3.0.2, 2.3.2.
pkg:npm/picomatch
Vulnerability advisories affecting package pkg:npm/picomatch. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3v7f-55p6-f55p | CVE-2026-33672 | MODERATE | Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Matching |
| GHSA-c2c7-rcm5-vvqj | CVE-2026-33671 | HIGH | Picomatch has a ReDoS vulnerability via extglob quantifiers |
CVE-2026-33672 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-33672
To remediate this vulnerability, upgrade all affected Picomatch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install picomatch@4.0.4
npm install picomatch@3.0.2
npm install picomatch@2.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls picomatch
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-33672, inspect your project dependencies using npm:
npm ls picomatch
Analyze the terminal output to locate any version of Picomatch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.4), your application is affected.
Note: The npm ls picomatch command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Picomatch, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33672 Affected Picomatch Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
picomatch
|
npm |
≥ 4.0.0
< 4.0.4
|
4.0.4
|
|
picomatch
|
npm |
≥ 3.0.0
< 3.0.2
|
3.0.2
|
|
picomatch
|
npm |
< 2.3.2
|
2.3.2
|
References
Frequently Asked Questions
What is CVE-2026-33672?
Which Picomatch versions are affected?
What version fixes CVE-2026-33672?
Is picomatch affected?
What is the CVSS score of CVE-2026-33672?
What CWE is associated with CVE-2026-33672?
How can I check npm dependencies for CVE-2026-33672?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3v7f-55p6-f55p",
"modified" : "2026-03-27T21:36:24Z",
"published" : "2026-03-25T21:13:39Z",
"aliases" : [ "CVE-2026-33672" ],
"summary" : "Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Matching",
"details" : "### Impact\npicomatch is vulnerable to a **method injection vulnerability (CWE-1321)** 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.\n\nThis 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.\n\nAll users of affected `picomatch` versions that process untrusted or user-controlled glob patterns are potentially impacted.\n\n### Patches\n\nThis issue is fixed in picomatch 4.0.4, 3.0.2 and 2.3.2.\n\nUsers should upgrade to one of these versions or later, depending on their supported release line.\n\n### Workarounds\n\nIf upgrading is not immediately possible, avoid passing untrusted glob patterns to picomatch.\n\nPossible mitigations include:\n- Sanitizing or rejecting untrusted glob patterns, especially those containing POSIX character classes like `[[:...:]]`.\n- Avoiding the use of POSIX bracket expressions if user input is involved.\n- Manually patching the library by modifying `POSIX_REGEX_SOURCE` to use a null prototype:\n\n ```js\n const POSIX_REGEX_SOURCE = {\n __proto__: null,\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n // ... rest unchanged\n };\n \n### Resources\n\n- fix for similar issue: https://github.com/micromatch/picomatch/pull/144\n- picomatch repository https://github.com/micromatch/picomatch",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "picomatch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "picomatch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "picomatch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/micromatch/picomatch/security/advisories/GHSA-3v7f-55p6-f55p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33672"
}, {
"type" : "WEB",
"url" : "https://github.com/micromatch/picomatch/commit/4516eb521f13a46b2fe1a1d2c9ef6b20ddc0e903"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/micromatch/picomatch"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-25T21:13:39Z",
"nvd_published_at" : "2026-03-26T22:16:30Z"
}
}