Skip to content

Update dependency glob to v14 [SECURITY] - #1135

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-glob-vulnerability
Nov 1, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/npm-glob-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
glob 13.0.6 → 14.0.2 age confidence

Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal

CVE-2026-118773 / GHSA-3g3m-2fjr-6pw4

More information

Details

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.

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

isaacs/node-glob (glob)

v14.0.2

Compare Source

v14.0.1

Compare Source

v14.0.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot enabled auto-merge (squash) November 1, 2026 02:30
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c5710f6-69c2-415f-8061-3c2d681a908a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codecov-commenter

codecov-commenter commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (824a4f1) to head (3e957c7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1135   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         2244      2244           
  Branches       332       332           
=========================================
  Hits          2244      2244           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate
renovate Bot merged commit 3d0f777 into main Nov 1, 2026
7 checks passed
@renovate
renovate Bot deleted the renovate/npm-glob-vulnerability branch November 1, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant