GHSA-3g3m-2fjr-6pw4: Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal

Published Oct 29, 2026
·
Updated

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

Other sources

Glob matches files using patterns the shell uses. From 9.0.0 until 14.0.2, abort branches in src/walker.ts, including GlobUtil.walkCB(), GlobUtil.walkCB2(), GlobUtil.walkCBSync(), and GlobUtil.walkCB2Sync(), invoke the callbacks without returning. After AbortSignal or AbortSignal.timeout() rejects or emits an error, execution can continue into processor.processPatterns(), readdirCB(), and recursive traversal. The issue affects glob() and globStream() when applications expose attacker-influenced patterns or directory trees and rely on cancellation as a traversal budget. Repeated timed-out requests can stack background filesystem operations and CPU work, degrading worker throughput or service availability; no confidentiality or integrity impact was observed. This issue is fixed in 14.0.2.

— OSV

Affected Software

2 affected componentsFixes available
npm/glob>=9.0.0<=14.0.1
14.0.2
npm/glob>=9.0.0<14.0.2
14.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/glob to a version that resolves this vulnerability.

    Fixed in 14.0.2
  2. Upgrade

    Upgrade glob to a version that resolves this vulnerability.

    Fixed in 14.0.2

Event History

Oct 29, 2026
CVE Published
via OSV·06:27 PM
Data Sourced
via OSV·06:27 PM
DescriptionSeverityWeakness
Oct 30, 2026
Advisory Published
via GitHub·11:09 PM
Data Sourced
via GitHub·11:09 PM
DescriptionWeaknessAffected Software
Data Sourced
via OSV·11:09 PM
Affected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203