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
2 new1 fixed
Security
3 advisories affect 2.1.15; 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
Don't upload
functions/directory as part ofwrangler pages publishIf the root directory of a project was the same as the build output directory, we were previously uploading the
functions/directory as static assets. This PR now ensures that thefunctions/files are only used to create Pages Functions and are no longer uploaded as static assets.Additionally, we also now do upload
_worker.js,_headers,_redirectsand_routes.jsonif they aren't immediate children of the build output directory. Previously, we'd ignore all files with this name regardless of location. For example, if you have apublic/blog/how-to-use-pages/_headersfile (wherepublicis your build output directory), we will now upload the_headersfile as a static asset.Add a
passThroughOnException()handler in Pages FunctionsThis
passThroughOnException()handler is not as good as the built-in for Workers. We're just adding it now as a stop-gap until we can do the behind-the-scenes plumbing required to make the built-in function work properly.We wrap your Pages Functions code in a
try/catchand on failure, if you callpassThroughOnException()we defer to the static assets of your project.For example:
export const onRequest = ({ passThroughOnException }) => { passThroughOnException(); x; // Would ordinarily throw an error, but instead, static assets are served. };Added error logging for pages upload
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.