npm undici 8.12.4
v8.12.4

latest release: 7.30.2
6 hours ago

⚠️ Security Fixes

This release fixes six vulnerabilities.

CVE-2026-116592 / GHSA-mqg3-3v4r-cm32 (high)

Undici 8.12.2 and 8.12.3 could cache the final response from a redirect chain under the original request key without applying the origin, cache policy, freshness, or Vary requirements of every intermediate hop. This could poison a cache or expose one user's response to another user. The fix validates every redirect hop, combines their Vary fields, limits freshness and stale serving to the most restrictive hop, and invalidates persistent SQLite entries written by vulnerable releases.

CVE-2026-120474 / GHSA-7xg3-fphp-28hg (medium)

A shared cache used with compose(redirect(), cache()) could store a credential-dependent response from a same-origin redirect under the original URL. A later authenticated or unauthenticated request could then receive another user's response. Redirected requests carrying Authorization, Cookie, or Proxy-Authorization are no longer stored under the original alias key.

CVE-2026-116630 / GHSA-5rm8-gv32-r954 (medium)

A cross-origin redirect during cache revalidation could let a 304 Not Modified response from the redirect target validate a cached response from the original origin. Undici now checks that the revalidation target matches the cached URL and that any returned validator matches the stored representation before replaying the cached body.

CVE-2026-120415 / GHSA-9v6h-8rgp-m69f (medium)

The redirect interceptor did not strip credentials correctly when request headers were supplied as an array of [name, value] pairs. With a header-normalizing interceptor outside redirect(), credentials could be sent to a cross-origin redirect target. Undici now handles both tuple arrays and flat header arrays when removing sensitive headers.

CVE-2026-120222 / GHSA-3g9m-rv3r-w5w2 (medium)

A downstream handler exception during cache replay could escape as an uncaught exception or unhandled promise rejection and terminate the process. This included dump size-limit failures, excessive Content-Encoding values in decompress, asynchronous cache-store failures, and cached-body replay after a 304. These failures are now reported as request errors.

CVE-2026-120423 / GHSA-r4pc-4jcp-7pqc (medium)

fetch() could skip Subresource Integrity verification when valid integrity metadata was separated or surrounded by ASCII whitespace other than a space, including a horizontal tab. Integrity metadata is now split on all ASCII whitespace before SHA-256, SHA-384, or SHA-512 verification.

What's Changed

  • docs: clarify that origin is optional only for origin-bound dispatchers by @attilayener in #5994
  • fix(mock): ignore the trailing slash before a query string by @lprnmns in #6031
  • build(deps-dev): bump eslint from 10.12.0 to 10.13.0 by @dependabot[bot] in #6059
  • build(deps-dev): bump neostandard from 0.14.0 to 0.14.1 by @dependabot[bot] in #6058
  • docs: add QUERY to the documented retry default methods by @qodelicious in #6062
  • docs: fix a couple of typos by @qodelicious in #6057
  • build(deps): bump cronometro from 6.0.3 to 7.0.1 in /benchmarks by @dependabot[bot] in #5969
  • fix: let interim 1xx responses through DecoratorHandler by @mrityunjay-pandey in #6028
  • fix(types): declare FormData prototype methods by @RlxChap2 in #6056
  • fix(cache): ignore SQLITE_BUSY in the sqlite cache store by @isHeSatoshi in #6049
  • fix(http2): keep persistent error sink on released streams by @mcollina in #5983
  • fix(h2): replay requests whose HEADERS raced a GOAWAY by @mohamed-rdr in #6065
  • build(deps-dev): bump @fastify/busboy from 3.2.3 to 3.2.4 by @dependabot[bot] in #6102
  • build(deps-dev): bump undici from 6.29.0 to 6.29.1 by @dependabot[bot] in #6103
  • disable wasm SIMD on the RISC-V by @hrw in #6041
  • fix(mock): expose aborted on the mock dispatch controller by @santiago-su in #5964
  • fix(fetch): avoid eager reads from async iterable bodies by @Kesavamoorthig06 in #5990
  • fix(h2): preserve accepted streams with deferred ids by @EpicHigh in #6090
  • fix(fetch): preserve abort propagation after garbage collection by @BridgeAR in #6070
  • build(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2 by @dependabot[bot] in #6125
  • build(deps): bump step-security/harden-runner from 2.21.1 to 2.22.3 by @dependabot[bot] in #6127
  • build(deps-dev): bump node-forge from 1.4.0 to 1.4.2 by @dependabot[bot] in #6134
  • build(deps-dev): bump jsondiffpatch from 0.7.6 to 0.7.7 by @dependabot[bot] in #6140

New Contributors

Full Changelog: v8.12.3...v8.12.4

Don't miss a new undici release

NewReleases is sending notifications on new releases.