github cloudflare/workers-sdk wrangler@4.153.0

Minor Changes

  • #14865 c0e915f Thanks @TheSaiEaranti! - Add an --infer-origin-from-routes flag to wrangler dev

    When a config has routes, local dev infers the origin from the first route, so the Worker sees request.url, the Host header, and any Origin header rewritten to the route's host even though the client connected to localhost. That silently breaks Host/Origin-sensitive logic — for example a CORS check allowlisting http://localhost:* receives http://<route-host> instead and rejects the request only in local dev.

    The inference is intentional and remains the default. Passing --infer-origin-from-routes=false now opts out, preserving the real local origin without removing routes from the config. An explicitly configured --host, --local-upstream, or dev.host continues to take precedence either way. The flag only affects local development: in remote mode the route host still determines the preview session as before.

  • #15955 23ef63a Thanks @ericclemmons! - Expand dotenv variable references in --secrets-file input

    Dotenv files supplied through --secrets-file to deploy, versions upload, and preview now expand $VAR and ${VAR} references using process values and earlier file values. Process environment values override matching file keys, including explicitly empty values. Treat dotenv secrets files as trusted input: they can read and upload any process environment value, such as a CI credential referenced by X=${GITHUB_TOKEN}. In CI, use secrets files whose contents untrusted contributors cannot modify.

    This changes how existing dotenv secrets files are interpreted: an unset reference becomes an empty string, so PASSWORD=pa$word becomes pa when word is unset. Escape literal dollar signs with a backslash (PASSWORD=pa\$word), or use a JSON secrets file to preserve values exactly. JSON input and bulk-secret commands, including piped stdin, retain their existing literal parsing.

Patch Changes

  • #16403 5f82a56 Thanks @dependabot! - Update DEFAULT_COMPAT_DATE to 2026-10-22

    Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.

  • #16437 e651d7c Thanks @dependabot! - Update DEFAULT_COMPAT_DATE to 2026-10-23

    Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.

  • #16403 5f82a56 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20261019.1 ^5.20261022.1
    workerd 1.20261019.1 1.20261022.1
  • #16437 e651d7c Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20261022.1 ^5.20261023.1
    workerd 1.20261022.1 1.20261023.1
  • #16476 8a30d8e Thanks @tannerlinsley! - Update Undici to 7.30.1 to prevent a malformed HTTP response from crashing development tools

    The updated shared dependency rejects excessive content encodings without leaving an unhandled stream error when the server closes the connection early. This fixes GHSA-xjj6-f33q-929c and keeps the matching Undici types on the same version.

  • #16485 b7e762d Thanks @Cherry! - Fix the Windows keyring install when the config path contains a space

    On Windows, wrangler login --use-keyring could not set up keyring storage when the configuration path contained a space, such as a C:\Users\John Smith profile, so credentials fell back to the plaintext file. Keyring setup now works for those paths and credentials are stored encrypted.

  • #16405 c709bff Thanks @ondraulehla! - Fix kv key list returning only the first 1000 keys in local mode

    Listing a local namespace with more than 1000 keys stopped after the first 1000 without any warning, so the output looked complete when it wasn't. kv key list now returns every key in local mode, with or without --prefix.

  • #16490 bcd618d Thanks @petebacondarwin! - Update Zod to 4.6.6 to address GHSA-mrhx-c7xc-m3w5

    The updated shared dependency fixes excessive memory consumption when validating oversized collections. This updates both the published Zod dependencies and the copies bundled into development tools and Workers.

  • Updated dependencies [9e05ade, 5f82a56, e651d7c, 5f82a56, e651d7c, 8a30d8e, bcd618d]:

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.