wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
2.21.3 is the newest release of 2.x.
In short
1 new7 fixed
Security
3 advisories affect 2.9.0; 3.114.17 fixes them
- CriticalArbitrary remote code execution within `wrangler dev` Workers sandboxGHSA-f8mp-x433-5wpf · 3 Jan 2024Fixed in 2.20.2
- HighWrangler affected by OS Command Injection in `wrangler pages deploy`GHSA-36p8-mvp6-cv38 · 21 Jan 2026Fixed in 3.114.17
- ModerateCloudflare Wrangler directory traversal vulnerabilityGHSA-8c93-4hch-xgxp · 3 Aug 2023Fixed in 2.20.1
Release note
Minor Changes
Prefer the
workerdexportscondition when bundling.This can be used to build isomorphic libraries that have different implementations depending on the JavaScript runtime they're running in.
When bundling, Wrangler will try to load theworkerdkey.
This is the standard key for the Cloudflare Workers runtime.
Learn more about the conditionalexportsfield here.
Patch Changes
Wrangler now supports an
--experimental-json-configflag which will read your configuration from awrangler.jsonfile, rather thanwrangler.toml. The format of this file is exactly the same as thewrangler.tomlconfiguration file, except that the syntax isJSONC(JSON with comments) rather thanTOML. This is experimental, and is not recommended for production use.Fix d1 directory not being created when running the
wrangler d1 executecommand with the--yes/-yflagAdd support for D1 databases when bundling an
_worker.jsonwrangler pages publishDo not crash in wrangler dev when passing a request object to fetch
This reverts and fixes the changes in #1769
which does not support creating requests from requests whose bodies have already been consumed.Fixes #2562
Implement
d1 list --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test % npx wrangler d1 list -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 🚧 To give feedback, visit https://discord.gg/cloudflaredev -------------------- ┌──────────────────────────────┬─────────────────┐ │ uuid │ name │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test2 │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test3 │ └──────────────────────────────┴─────────────────┘
After:
rozenmd@cflaptop test % npx wrangler d1 list --json [ { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test2" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test3" }, ]Fix
wrangler publish --dry-runto not require authentication when using QueuesImplement
d1 execute --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" ▲ [WARNING] Processing wrangler.toml configuration: - D1 Bindings are currently in alpha to allow the API to evolve before general availability. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>` -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to <https://github.com/cloudflare/wrangler2/issues/new/choose> 🚧 To request features, visit <https://community.cloudflare.com/c/developers/d1> 🚧 To give feedback, visit <https://discord.gg/cloudflaredev> -------------------- 🌀 Mapping SQL input into an array of statements 🌀 Parsing 1 statements 🌀 Executing on test (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx): 🚣 Executed 1 command in 11.846710999961942ms ┌────────────┬─────────────────────┬───────────────────┐ │ CustomerID │ CompanyName │ ContactName │ ├────────────┼─────────────────────┼───────────────────┤ │ 1 │ Alfreds Futterkiste │ Maria Anders │ ├────────────┼─────────────────────┼───────────────────┤ │ 4 │ Around the Horn │ Thomas Hardy │ ├────────────┼─────────────────────┼───────────────────┤ │ 11 │ Bs Beverages │ Victoria Ashworth │ ├────────────┼─────────────────────┼───────────────────┤ │ 13 │ Bs Beverages │ Random Name │ └────────────┴─────────────────────┴───────────────────┘After:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" --json [ { "results": [ { "CustomerID": 1, "CompanyName": "Alfreds Futterkiste", "ContactName": "Maria Anders" }, { "CustomerID": 4, "CompanyName": "Around the Horn", "ContactName": "Thomas Hardy" }, { "CustomerID": 11, "CompanyName": "Bs Beverages", "ContactName": "Victoria Ashworth" }, { "CustomerID": 13, "CompanyName": "Bs Beverages", "ContactName": "Random Name" } ], "success": true, "meta": { "duration": 1.662519000004977, "last_row_id": null, "changes": null, "served_by": "primary-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.db3", "internal_stats": null } } ]
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.