Skip to content

chore(security): upgrade Wrangler 3.x → 4.13.0 to fix esbuild vulnerability#3

Merged
ashercoren merged 1 commit intomainfrom
upgrade-wrangler-4
Apr 9, 2026
Merged

chore(security): upgrade Wrangler 3.x → 4.13.0 to fix esbuild vulnerability#3
ashercoren merged 1 commit intomainfrom
upgrade-wrangler-4

Conversation

@ashercoren
Copy link
Copy Markdown
Member

Summary

  • Upgrades wrangler from ^3.72.3 to 4.13.0 in vim--base-app-template--react
  • Eliminates the vulnerable esbuild@0.17.19 that was pinned inside Wrangler 3.x (node_modules/wrangler/node_modules/esbuild)
  • Wrangler 4.13.0 ships with esbuild 0.25.2, which is not affected

Security context

Wrangler 3.x pins esbuild@0.17.19, which is affected by GHSA-67mh-4wv8-2f99 — esbuild's dev server accepts cross-origin requests, allowing any website to read responses from the local dev server. The vulnerability is fully resolved in esbuild ≥0.25.3 (addressed in Wrangler ≥4.13.0).

Why 4.13.0 (pinned, not ^4.13.0)

Later 4.x releases (≥4.14.x) require Node ≥20.3.0. The project currently runs Node 18, so this is pinned to exactly 4.13.0 — the minimum version that resolves the vulnerability and is compatible with Node 18. When the project moves to Node 20+, the pin can be relaxed to ^4.x.x.

Breaking changes assessed

All Wrangler 4.0 breaking changes were reviewed against this repo's usage. None apply:

  • Only wrangler pages dev is used (in the dev:functions script) — no removed commands are in use
  • wrangler.toml only configures standard Pages bindings — no deprecated config fields present
  • No getBindingsProxy, --node-compat, legacy assets, or removed D1 commands are used
  • No dynamic wildcard imports in the functions/ source files

Test plan

  • npm run dev starts successfully (both Vite and Wrangler Pages dev server)
  • npm audit no longer reports the esbuild@0.17.19 vulnerability

Resolves the esbuild <=0.17.x vulnerability (GHSA-67mh-4wv8-2f99 /
CVE-2025-25193) by upgrading wrangler from ^3.72.3 to 4.13.0.
Wrangler 4.x ships esbuild 0.25.2, eliminating the vulnerable
0.17.19 copy that was nested under node_modules/wrangler/.

Pinned to exactly 4.13.0 (rather than ^4.13.0) because later 4.x
releases require Node >=20.3.0 and the project currently runs Node 18.

Made-with: Cursor
@ashercoren ashercoren requested a review from a team as a code owner April 9, 2026 10:29
@ashercoren ashercoren merged commit 96c427b into main Apr 9, 2026
1 check passed
@ashercoren ashercoren deleted the upgrade-wrangler-4 branch April 9, 2026 10:55
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