fix: upgrade brace-expansion to patched versions (CVE-2026-14257) - #42583
Conversation
Regenerate superset-frontend/package-lock.json so every transitive brace-expansion resolution lands on a patched release: 1.1.17 (the minimatch@3 line), 2.1.3 (minimatch@5-9 line), and 5.0.8 (minimatch@10+ line). No package.json change is required: every dependent already declares a caret range that permits these same-major patched versions, so npm was simply pinned to older patch releases in the lockfile. 7 of the 19 brace-expansion lock entries were stale and are bumped by this change; the remaining 12 were already on a patched version. This supersedes the approach in apache#42435, which added a package.json `overrides` block forcing brace-expansion to 1.1.17/2.1.3/5.0.8 globally, including for the root minimatch@3.1.4 dependency that lerna pins and that eslint-plugin-import (part of the lint-frontend chain) resolves to. minimatch@3.x depends on brace-expansion@^1.1.7 (the 1.x API); forcing it to 5.0.8 is a 4-major-version jump whose API no longer matches what Minimatch.braceExpand expects, and per @rusackas's report on apache#42435 that broke lint-frontend/validate-frontend with `TypeError: expand is not a function` in `Minimatch.braceExpand`. Bumping only the resolutions that are actually vulnerable, within each dependent's own existing semver range, avoids that collision. Advisory: GHSA-mh99-v99m-4gvg
|
Bito Automatic Review Skipped - Files Excluded |
|
Verified this locally against the resolved
Before contrast ( All post-bump instances land on 1.1.17 / 2.1.3 / 5.0.8, matching the fixed versions in the advisory. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42583 +/- ##
==========================================
- Coverage 65.33% 65.33% -0.01%
==========================================
Files 2803 2803
Lines 158490 158481 -9
Branches 36178 36176 -2
==========================================
- Hits 103557 103545 -12
- Misses 52922 52924 +2
- Partials 2011 2012 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Bito Automatic Review Skipped – PR Already Merged |
Summary
Fixes CVE-2026-14257 (brace-expansion regex denial-of-service, GHSA-mh99-v99m-4gvg) for
superset-frontendwith a lockfile-only change: nopackage.jsonedits.Every dependent in
superset-frontend/package-lock.jsonthat pulls inbrace-expansionalready declares a caret range (^1.1.7,^2.0.1/^2.0.2,^5.0.2/^5.0.5) that permits the patched same-major releases. The lockfile was simply pinned to older, vulnerable patch versions. Regenerating the lock (npm update brace-expansion) moves every resolution to a patched version with zeropackage.jsondiff:node_modules/brace-expansion(root)@jest/reportersfilelistjest-configjest-runtime@typescript-eslint/typescript-estreetypescript-json-schemaThat's 7 of the 19 total
brace-expansionlock entries; the other 12 were already resolved to a patched version (1.1.17 / 2.1.3 / 5.0.8) before this change.Why not
overrides(superseding #42435)#42435 attempted to fix this with a
package.jsonoverridesblock forcingbrace-expansionto1.1.17/2.1.3/5.0.8globally. That approach brokelint-frontend/validate-frontend(see #42435 comment): the rootminimatch@3.1.4dependency — pinned bylernaand resolved transitively byeslint-plugin-import(part of the lint chain) — depends onbrace-expansion@^1.1.7(the 1.x API). Forcing that resolution to5.0.8is a 4-major-version jump whose API no longer matches whatMinimatch.braceExpandexpects, producingTypeError: expand is not a function.This PR instead bumps only the resolutions that are actually vulnerable, each staying within its own dependent's existing semver range, so the
minimatch@3.x/brace-expansion@1.xchain used by lint is untouched (it moves from1.1.16to1.1.17, both within the same API generation).Test plan
npm update brace-expansionregenerates the lock with the 7 resolutions above; confirmed zeropackage.jsondiff (git diff --statshows onlypackage-lock.json).npx eslint --versionresolves cleanly (v10.7.0) after the lockfile change.minimatch/brace-expansionchain still loads and works:require('minimatch')('src/foo.tsx', 'src/**/*.{ts,tsx}')returnstrue, andminimatch.braceExpand('{a,b,c}.js')returns['a.js','b.js','c.js'].lint-frontend/validate-frontend/ test suite left to CI.Advisory: GHSA-mh99-v99m-4gvg
CVE: CVE-2026-14257