Medium

Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal

  • Disclosed: 30.10.2026
  • Updated: 31.10.2026 01:17

Summary

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:

  1. Install the affected package: npm init -y npm install glob@13.0.6

  2. 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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package glob >= 9.0.0, < 14.0.2 14.0.2

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-400
Platform
npm
Package
glob
Disclosed
30.10.2026
Updated
31.10.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-3g3m-2fjr-6pw4 - CC BY 4.0

Vulnerability history: glob

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
11.2025 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 1

Disclosures per year

  1. 2025: 1
  2. 2026: 1
  1. Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal this entry
    Medium CVE-2026-118773 >= 9.0.0, < 14.0.2 14.0.2
  2. High · 7.5 CVE-2025-64756 >= 11.0.0, < 11.1.0, >= 10.2.0, < 10.5.0 11.1.0, 10.5.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.