Summary
Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal
In glob 13.0.6, an aborted async walk rejects or emits an error but continues recursively reading directories in the background.
The root cause is that abort branches in src/walker.ts call cb() without returning. As a result, callers that rely on signal or AbortSignal.timeout() to bound glob traversal cost can still incur filesystem I/O and CPU work after the request has already been rejected.
Details
This was reproduced on glob v13.0.6 (commit e80cb38ae60d6cbff9e75f39032a994858994d35).
The README documents that the signal option cancels the glob walk. However, in src/walker.ts, the following methods call cb() when this.signal?.aborted is true but do not return:
- GlobUtil.walkCB()
- GlobUtil.walkCB2()
- GlobUtil.walkCBSync()
- GlobUtil.walkCB2Sync()
Example vulnerable pattern:
if (this.signal?.aborted) cb()
Because execution continues after cb(), the walker still reaches processor.processPatterns(), readdirCB(), and recursive walkCB2() calls.
The issue was directly demonstrated against v13.0.6. A source-history review shows the same missing-return pattern is present in tagged releases from v9.0.0 through v13.0.6.
The issue affects both glob() and globStream().
Recommended fix:
Change each abort branch to return immediately:
if (this.signal?.aborted) return cb()
Proof of concept
Environment:
- Linux x86_64
- Node.js v22.23.3
- npm 10.9.9
- glob 13.0.6
Reproduction steps:
Install the affected package:
npm init -y
npm install [email protected]Run the attached PoC:
node poc/abort-continues-work.mjs
The PoC aborts after the first readdir() call, waits briefly, and counts how many more directory reads happen after the promise has already rejected.
Observed output on the vulnerable version:
{
"rejection": "Error: probe-abort",
"readdirCalls": 1365,
"readdirCallsAtReject": 5,
"readdirCallsAfterReject": 1360
}
Expected behavior:
readdirCallsAfterReject should be 0.
A second PoC using AbortSignal.timeout() also reproduces the issue:
{
"rejection": "TimeoutError: The operation was aborted due to timeout",
"readdirCalls": 133,
"readdirCallsAtReject": 1,
"readdirCallsAfterReject": 132
}
The same test against a patched build with return cb() in the four abort branches stops immediately:
{
"readdirCalls": 1,
"readdirCallsAtReject": 1,
"readdirCallsAfterReject": 0
}
Impact
This is an availability issue.
Applications that expose globbing over attacker-influenced patterns or attacker-controlled directory trees and use AbortSignal / AbortSignal.timeout() as a traversal budget can still perform significant filesystem I/O and CPU work after a request has already timed out or been canceled.
Repeated timed-out requests can stack background glob walks and degrade worker throughput or service availability.
No confidentiality or integrity impact was observed.
Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-118773? CVE-2026-118773 is a medium-severity uncontrolled resource consumption vulnerability in glob (npm), affecting versions >= 9.0.0, <= 14.0.1. It is fixed in 14.0.2. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
- Which versions of glob are affected by CVE-2026-118773? glob (npm) versions >= 9.0.0, <= 14.0.1 is affected.
- Is there a fix for CVE-2026-118773? Yes. CVE-2026-118773 is fixed in 14.0.2. Upgrade to this version or later.
- Is CVE-2026-118773 exploitable, and should I be worried? Whether CVE-2026-118773 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-118773 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-118773? Upgrade
globto 14.0.2 or later.