Skip to content

fix(deps): override minimatch to ^11.0.9 under nodemon - #83

Merged
luispabon merged 1 commit into
mainfrom
fix/minimatch-11-override
Nov 24, 2026
Merged

luispabon merged 1 commit into
mainfrom
fix/minimatch-11-override

Conversation

@luispabon

Copy link
Copy Markdown
Collaborator

Closes Dependabot alert #94.

Cause

minimatch@10.2.6 reached the tree as a dev-only transitive dependency of nodemon@3.1.14 (minimatch: ^10.2.1).

  • Advisory: GHSA-g3hv-75wg-m249 / CVE-2026-118764, medium, CWE-405
  • Affected: >= 7.0.0, < 11.0.1; first patched: 11.0.1
  • Mechanism: **/../ clones entries into globParts inside a fixpoint loop, then secondPhasePreProcess() compares pairs, so an attacker-supplied pattern causes quadratic CPU and memory use. It needs optimizationLevel >= 2.

nodemon@3.1.14 is the latest release and still declares ^10.2.1. The 10.x line stops at 10.2.6 (no legacy-v10 dist-tag), so no backport is available and no parent bump exists.

Change

Scoped npm override in package.json, plus the regenerated lockfile:

"overrides": {
  "nodemon": {
    "minimatch": "^11.0.9"
  }
}

minimatch@11.0.9 is the version eslint 10.15.0 already resolves (^11.0.5), so the 11.x line was already exercised in this repo. The override also collapses the two nested 11.0.9 copies into one hoisted install, which is why the lockfile diff is a net deletion.

Verification

Check Result
npm install (lockfile regeneration) 2 added, 1 removed, 8 changed
npm ci added 231 packages, lockfile consistent
npm ls minimatch single minimatch@11.0.9, 10.2.6 gone
npm audit found 0 vulnerabilities
npm run lint eslint + prettier clean
npm test 36/36 pass
nodemon smoke test boots src/server.js, restarts on file change, exits cleanly

Notes

  • Dev-only. Nothing in the request path, the Docker image or the container runtime uses minimatch.
  • minimatch@11 requires Node 20 || >=22 (10.x allowed 18). The repo and container are on Node 24, and CI runs the same, so no engines change is needed.
  • Exposure was theoretical here anyway: nodemon calls minimatch with only { dot: true }, and the vulnerable branch needs optimizationLevel >= 2 against a default of 1. The override removes the flagged version rather than relying on that argument.
  • Follow-up: drop the override once nodemon widens its own minimatch range.

Dependabot alert 94 / GHSA-g3hv-75wg-m249 (CVE-2026-118764): minimatch
>= 7.0.0 < 11.0.1 amplifies globParts in firstPhasePreProcess when
optimizationLevel >= 2, so an attacker-controlled pattern can force
quadratic work.

nodemon 3.1.14 is the latest release and still requires minimatch
^10.2.1, and 10.x stops at 10.2.6 with no patched release. A scoped
override moves nodemon onto the 11.x line eslint already uses, which
also dedupes the two nested 11.0.9 copies into one.

npm audit now reports 0 vulnerabilities. lint, 36 tests, npm ci and a
nodemon restart smoke test pass. Remove the override once nodemon
widens its own range.
@luispabon
luispabon merged commit 0cb2da6 into main Nov 24, 2026
3 checks passed
@luispabon
luispabon deleted the fix/minimatch-11-override branch November 24, 2026 14: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