fix: update brace-expansion to 2.1.4 within minimatch's declared range (CVE-2026-14257, CVE-2026-69152) - #2
Conversation
|
Thanks for flagging this. Before I can evaluate the proposed override, could you please clarify or provide the following?
In my testing, I’m open to a compatible remediation if the vulnerability is reachable, but I’d prefer an ordinary upstream or direct-dependency update over a transitive override where possible. |
|
For context, I’ve reviewed the current dependency path and the immediate risk to GDMS users appears low. I’m leaving this PR open for now to allow time for clarification or a compatible revision. I don’t want to merge the current cross-major override because it causes a reproducible compatibility failure in If there is evidence that the vulnerable path is reachable in GDMS, or a compatible upstream/direct-dependency update is available, I’m happy to reassess. Otherwise, I expect to wait for the dependency chain to be updated upstream. |
|
Thanks for the detailed review. I agree that the cross-major override to brace-expansion@5.x is not appropriate given minimatch@9.x’s declared ^2.x dependency and the reproducible runtime failure. I’ll rework the PR:
If the vulnerability is not reachable and there is no compatible upstream remediation yet, I agree that waiting for the dependency chain to update upstream is preferable to introducing a cross-major compatibility regression. I’ll update the PR once I’ve verified those points. |
brace-expansion 2.1.2 is affected by CVE-2026-14257 (GHSA-mh99-v99m-4gvg, patched 2.1.3) and CVE-2026-69152 (GHSA-rgw5-rvv9-x895, patched 2.1.4), which bypasses the CVE-2026-14257 mitigation. Version 2.1.4 is the first 2.x release patched for both. It enters the tree only through googleapis > googleapis-common > gaxios > rimraf > glob > minimatch, which declares ^2.0.2. 2.1.4 satisfies that range, so this is an in-range lockfile update: package.json is unchanged and no dependency override is required. Add test/dependencies.test.js to assert the resolved version stays patched and keeps satisfying every declared range in the lockfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7oXdhMLN1izUhx4JJbGWc
91eed09 to
248ac0b
Compare
|
I've reworked the PR and force-pushed. The 1. Authoritative advisory and ranges. Two advisories affect the installed 2.1.2:
Both are High (7.5, CWE-400/770). CVE-2026-69152 explicitly bypasses the CVE-2026-14257 mitigation, so 2.1.4 is the right target — 2.1.3 would be re-flagged immediately. On your last question: the "5.0.8, 3.0.3, 2.1.3, 1.1.17" in the original description are CVE-2026-14257's four per-release-line patch versions. The automation picked the 5.x line and then over-shot to 5.0.9, instead of the 2.x line that actually matches this tree. That's the root of the bug you found. 2. Dependency path. 3. Reachability — not reachable, confirming your assessment. Beyond GDMS not importing 4. Compatible parent upgrade — none available. That leaves remediation at npm update brace-expansion --package-lock-only "node_modules/brace-expansion": {
- "version": "2.1.2",
+ "version": "2.1.4",2.1.4 satisfies 5. Regression test. Since the path isn't reachable, a behavioral exploit test wouldn't be meaningful. I added
I verified both failure modes are actually caught: Test 2 would have blocked the previous revision before it reached you. Verification. Two smaller notes: I didn't bump the version or add a Thanks for the careful review — the cross-major override was the wrong call, and pushing back on it is what surfaced the in-range fix. |
Summary
Update
brace-expansionfrom 2.1.2 to 2.1.4 — an in-range lockfile update.package.jsonis unchanged frommain, and theoverridesblock from the original revision of this PR has been removed entirely.The original revision forced
brace-expansion@5.0.9across sixoverridesentries. That was wrong:minimatch@9.0.9declaresbrace-expansion@^2.0.2, and the cross-major override broke it at runtime, as @rsheyd demonstrated. This revision replaces that approach.Advisories
Two advisories affect the installed 2.1.2:
>=2.0.0 <2.1.3>=2.0.0 <2.1.4CVE-2026-69152 explicitly bypasses the CVE-2026-14257 mitigation, so 2.1.4 is the correct target — 2.1.3 would be re-flagged immediately.
Dependency path
brace-expansionhas exactly one depender in the graph:Reachability
Not reachable during normal GDMS operation. This confirms @rsheyd's assessment, with a further finding:
glob,minimatch,rimraf, orbrace-expansion(grepacrosssrc/,test/,scripts/,raycast-extension/,cloudflare/returns nothing).gaxios@7.1.3never loadsrimrafat all. Its published tarball ships onlybuild/, andrimrafappears solely in itspackage.json— zero references in shipped code.rimrafis declared in gaxios 7.1.3 alone: 7.1.2 did not have it, and 7.1.4, 7.1.5, 7.1.6, 7.2.0 and 7.3.x all dropped it again. It looks like a stray dependency, so this entire subtree is installed but never required at runtime.Why no parent upgrade is available
googleapis-common@8.0.3pinsgaxiosto the exact string"7.1.3"— the one gaxios release carryingrimraf— sonpm updatecannot move off it. The escape isgoogleapis-common@9.x(which usesgaxios ^7.3.0, norimraf), but evengoogleapis@178.0.0, the current latest, still declaresgoogleapis-common ^8.0.0, and 8.0.3 is the newest 8.x. No parent upgrade — in-range or via agoogleapismajor bump — removes the path today.Remediating at
brace-expansionitself is therefore the only option, and an in-range one exists.Changes
npm update brace-expansion --package-lock-onlyproduces a 3-line lockfile diff:"node_modules/brace-expansion": { - "version": "2.1.2", + "version": "2.1.4", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }package.json— reverted tomain; nooverrides.package-lock.json— the 3 lines above only.balanced-matchstays at 1.0.2 (its bump to 4.0.4 in the original revision was only a consequence of the 5.x override).test/dependencies.test.js— new regression test (below).AGENTS.md— file-map entry for the new test.brace-expansion@2.1.4depends onbalanced-match@^1.0.0(unchanged) and declares noenginesconstraint.Regression test
Since the vulnerable path is not reachable, a behavioral exploit test would not be meaningful. Instead,
test/dependencies.test.jsasserts two lockfile invariants (node:test, no new dependencies, no network):brace-expansionis>= 2.1.4.Both failure modes are verified to be caught:
Test 2 would have blocked the original revision of this PR before review.
Verification
npm run check— passes: 222 tests, syntax check, Raycast typecheck.npm audit— no longer reportsbrace-expansion; the only high-severity finding is cleared.Notes
CHANGELOG.mdentry, perAGENTS.md("internal-maintenance changes do not require a version bump").npm auditalso reports 3 unrelated moderate findings onmain(qsarray-limit bypass, anduuidviagaxios). Happy to open a separate PR if useful.