Skip to content

Fix minimatch ReDoS (CVE-2026-27903, CVE-2026-27904) via scoped overrides#546

Open
imenkov wants to merge 1 commit into
microsoft:masterfrom
imenkov:s360/sfi-es5.2/minimatch-cve-2026-27903-04
Open

Fix minimatch ReDoS (CVE-2026-27903, CVE-2026-27904) via scoped overrides#546
imenkov wants to merge 1 commit into
microsoft:masterfrom
imenkov:s360/sfi-es5.2/minimatch-cve-2026-27903-04

Conversation

@imenkov

@imenkov imenkov commented Jun 15, 2026

Copy link
Copy Markdown

Summary

Remediates two high-severity ReDoS CVEs in transitive minimatch copies:

Approach: scoped per-parent overrides (not a top-level pin)

minimatch is not a direct dependency of this repo — it ships transitively via glob, mocha, rimraf, archiver-utils, and readdir-glob. Each of those uses a different major line.

A blanket top-level "minimatch": "^X" override would force all consumers onto the same major, which (a) would have bumped mocha's internal globber across a major boundary, and (b) is the partial fix already in master from PR #544 — but #544 only covers the root glob chain, not the other four.

This PR replaces the top-level pin with ancestor-scoped overrides covering all five resolutions:

Chain Before After
rimraf > glob 3.1.2 3.1.5
mocha, mocha > glob, archiver > readdir-glob 5.1.6 5.1.9
archiver-utils > glob 9.0.5 9.0.9
root glob 10.1.1 10.2.5

Existing archiver-utils.glob ^10.5.0 override is preserved.

Files changed

  • package.jsonoverrides block restructured (no other changes)
  • package-lock.json — re-resolved

Validation

  • npm ci succeeds
  • npm run build (tsc + postbuild) succeeds — _build/tfx-cli.js runs and emits CLI help
  • TFX_TRACE=1 produces the expected tracer output (12 lines)
  • npm test206 passing / 0 failing / 0 pending in ~37s
  • npm audit confirms the two CVEs gone post-fix

Verified against docs/contributions.md end-to-end.

Relation to PR #544

This is a strict superset of PR #544's partial minimatch fix. It removes the single top-level "minimatch": "^10.2.3" pin from #544 and replaces it with five ancestor-scoped pins covering every vulnerable resolution — not just the root-glob chain.


🛠️ s360-breeze-toolkit · SFI-ES5.2 · run 495d2f2c

…ides

Pins every transitively-installed minimatch copy to the latest patch
in its major line via nested per-parent overrides:

  v3.1.2  -> v3.1.5   (rimraf>glob chain)
  v5.1.6  -> v5.1.9   (mocha, mocha>glob, archiver>readdir-glob chains)
  v9.0.5  -> v9.0.9   (archiver-utils>glob chain)
  v10.1.1 -> v10.2.5  (root glob chain)

Uses ancestor-scoped overrides rather than a top-level `minimatch` pin
to keep mocha (v5 line) and rimraf (v3 line) on API-compatible majors
and avoid bricking the test runner. Preserves the existing
archiver-utils.glob override.

S360-Run-Id: 495d2f2c-025e-4d09-ad47-bf5a23bad72f
S360-KPI: SFI-ES5.2
S360-Skill: dependabot:dependency-update-orchestrator
S360-Arm: dedicated_skill
S360-Action-Items: 928b7015-db58-41a3-94ea-ab73c7bb9f4d:17027a63-3844-47e7-858a-baccf93ba52e
@imenkov imenkov changed the title [s360-breeze-toolkit: SFI-ES5.2] Fix minimatch ReDoS (CVE-2026-27903, CVE-2026-27904) via scoped overrides Fix minimatch ReDoS (CVE-2026-27903, CVE-2026-27904) via scoped overrides Jun 15, 2026
@imenkov imenkov marked this pull request as ready for review June 15, 2026 08:25
@imenkov imenkov requested review from a team as code owners June 15, 2026 08:25
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