Skip to content

chore(deps): partially mitigate brace-expansion DoS (CVE-2026-14257) — full fix blocked upstream - #68

Closed
ladykirsah wants to merge 1 commit into
mainfrom
claude/dependabot-build-tooling
Closed

chore(deps): partially mitigate brace-expansion DoS (CVE-2026-14257) — full fix blocked upstream#68
ladykirsah wants to merge 1 commit into
mainfrom
claude/dependabot-build-tooling

Conversation

@ladykirsah

@ladykirsah ladykirsah commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Correction (supersedes the original description): this does not clear the advisory, and it cannot be fully fixed in this repo's lockfile. Kept as a small, verified, zero-risk partial. Details below.

The advisory

GHSA-mh99-v99m-4gvg / CVE-2026-14257 — brace-expansion DoS. Authoritative range: <= 5.0.7, first patched 5.0.8 (flat — every version at or below 5.0.7 is affected, across all majors).

Our tree has three brace-expansion copies:

copy consumer path status after this PR
5.0.7 → 5.0.8 glob@12 → minimatch@10 (via @opennextjs/cloudflare, typescript-eslint) ✅ patched here (safe — minimatch@10 uses the 5.x named expand export)
2.1.2 @node-minify/core@8.0.6 → glob@9 → minimatch@8 ❌ still <= 5.0.7 — cannot move
1.1.16 eslint + 5 eslint plugins → minimatch@3 ❌ still <= 5.0.7 — cannot move

Why the other two can't be fixed downstream (and why forcing it breaks the build)

minimatch@3 and minimatch@8 import brace-expansion's default export, which 5.x removed (it exposes only a named expand). A global overrides: { "brace-expansion": "5.0.8" } makes npm audit report 0 vulnerabilities — a false green — while the build breaks at runtime with expand is not a function. Do not do this. This is documented in opennextjs/opennextjs-aws#1204.

The real fix is upstream

  • @node-minify half: opennextjs/opennextjs-aws#1146 bumps @node-minify/core+terser to ^10.5.0 (pulls minimatch@10, compatible with 5.x). Open & mergeable but unreviewed since 2026-04-23.
  • eslint half: clears when eslint-config-next / the eslint plugins move off minimatch@3 upstream.

What this PR does

Bumps only the one node that can move safely: brace-expansion 5.0.7 → 5.0.8 on the minimatch@10/glob@12 path (in the build/deploy chain). A 4-line lockfile change. It reduces the count of actually-vulnerable nodes without touching anything that would break the build.

Verified: admin + storefront both build, 960 tests pass, typecheck clean, lint 0 errors. (npm's audit endpoint was returning malformed responses during this work, so the fix is confirmed by lockfile inspection + the authoritative GHSA range, not a live audit count.)

🤖 Generated with Claude Code

…scade)

npm audit flagged 13 HIGH in dev/build tooling that GitHub Dependabot did not
surface. They stem from two roots:

  1. brace-expansion (DoS via unbounded expansion) — FIXED HERE.
     Bumps the only vulnerable copy 5.0.7 -> 5.0.8 (in-range for its parent
     minimatch@10 ^5.0.5; the 1.1.16 and 2.1.2 copies were already patched).
     This clears brace-expansion AND every advisory that only cascaded from it:
     minimatch, glob, eslint, @eslint/config-array, @eslint/eslintrc,
     eslint-config-next, eslint-plugin-import, eslint-plugin-jsx-a11y,
     eslint-plugin-react. ~11 of the 13.

  2. @node-minify/core (via @opennextjs/aws -> @opennextjs/cloudflare) — NOT fixed.
     There is no non-major fix: 8.0.6 is the newest 8.x, and even the latest
     adapter (@opennextjs/cloudflare 1.20.2 -> @opennextjs/aws 4.1.0) still pins
     @node-minify/core ^8.0.6. The only remediation is forcing @node-minify/core
     to 9.x/10.x via override — a 2-major bump on the Cloudflare deploy adapter's
     build-time minifier. It runs on our own build output (not attacker input),
     so real risk is low. Deferred pending an upstream @opennextjs range bump
     rather than risking the deploy build.

Lockfile-only change (4 lines). Verified: 960 tests pass, typecheck clean,
lint 0 errors, admin + storefront both build. (npm's audit endpoint was
returning malformed responses during this work, so the fix is confirmed by
lockfile inspection — no vulnerable brace-expansion remains — plus the green
lint/build that exercise the eslint chain.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ladykirsah ladykirsah changed the title chore(deps): patch brace-expansion DoS (clears the eslint advisory cascade) chore(deps): partially mitigate brace-expansion DoS (CVE-2026-14257) — full fix blocked upstream Jul 26, 2026
@ladykirsah

Copy link
Copy Markdown
Owner Author

Superseded by #70's lockfile regen, which already pulled brace-expansion@5.0.8 onto main. The remaining 1.1.16/2.1.2 copies (still <= 5.0.7) can't be fixed downstream without breaking the build, and are tracked upstream at opennextjs/opennextjs-aws#1146 / #1204. Closing as redundant.

@ladykirsah ladykirsah closed this Jul 26, 2026
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