CVE-2026-137196: Glob : `ignore` patterns lack the braceExpandMax limit applied to `pattern`
Glob matches files using patterns the shell uses. From 13.0.5 until 14.0.6, the Ignore class in src/ignore.ts does not pass braceExpandMax to minimatch while using optimizationLevel: 2, so attacker-influenced ignore patterns can amplify into more globparts than the regular pattern path permits and cause quadratic work in secondPhasePreProcess(). Applications that accept untrusted ignore patterns can therefore experience disproportionate event-loop CPU consumption and denial of service. This issue is fixed in version 14.0.6.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.0.6
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using npm/glob versions from 13.0.5 through 14.0.5 are exposed if they accept attacker-influenced ignore patterns. The affected path is the Ignore class when it processes those patterns with optimizationLevel set to 2.
What does an attacker need to exploit it?
An attacker needs the ability to supply or influence ignore patterns processed by the application. Crafted patterns can expand into more globparts than the regular pattern path permits, causing disproportionate event-loop CPU use.
Is a default configuration affected?
The available information identifies the affected behavior specifically when Ignore processes patterns using optimizationLevel: 2. It does not state whether this configuration is enabled by default.
What should be done if immediate patching is not possible?
Do not accept untrusted ignore patterns, or restrict and validate attacker-influenced ignore-pattern input before it reaches glob. Updating to version 14.0.6 fixes the issue.