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
4 new2 fixed
Security
3 advisories affect 2.8.1; 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
Patch Changes
Make it possible to query d1 databases from durable objects
This PR makes it possible to access D1 from Durable Objects.
To be able to query D1 from your Durable Object, you'll need to install the latest version of wrangler, and redeploy your Worker.
For a D1 binding like:
[[d1_databases]] binding = "DB" # i.e. available in your Worker on env.DB database_name = "my-database-name" database_id = "UUID-GOES-HERE" preview_database_id = "UUID-GOES-HERE"
You'll be able to access your D1 database via
env.DBin your Durable Object.Support
queueandtraceevents in module middleware. This means thatqueueandtraceevents should work properly with the--test-scheduledflagAdds unstable_pages module to JS API
Add metrics for deployments
Add support for wasm module imports in
wrangler pages devCurrently it is not possible to import
wasmmodules in either Pages
Functions or Pages Advanced Mode projects.This commit caries out work to address the aforementioned issue by
enablingwasmmodule imports inwrangler pages dev. As a result,
Pages users can now import theirwasmmodules withing their Functions
or_worker.jsfiles, andwrangler pages devwill correctly bundle
everything and serve these "external" modules.import hello from "./hello.wasm" export async function onRequest() { const module = await WebAssembly.instantiate(hello); return new Response(module.exports.hello); }Copy module imports related files to outdir
When we bundle a Worker
esbuildtakes care of writing the
results to the output directory. However, if the Worker contains
anyexternalimports, such as text/wasm/binary module imports,
that cannot be inlined into the same bundle file,bundleWorker
will not copy these files to the output directory. This doesn't
affectwrangler publishper se, because of how the Worker
upload FormData is created. It does however create some
inconsistencies when runningwrangler publish --outdirorwrangler publish --outdir --dry-run, in that,outdirwill
not contain those external import files.This commit addresses this issue by making sure the aforementioned
files do get copied over tooutdirtogether withesbuild's
resulting bundle files.
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.