On 4 December 2026 the undici team released undici 8.14.1 and 7.30.4, two security releases that each fix thirteen vulnerabilities. Undici is the HTTP client behind Node.js’s built-in fetch(), and many apps also install it directly from npm for its request() API, connection pools, proxies and interceptors. Several of the bugs are rated high. Some let a malicious server crash your process, and some affect TLS checks and shared caches.

This guide explains which apps are affected, how to check your version, and what to change. Details come from the official undici v8.14.1 release notes and v7.30.4 release notes.

Which version do you need?

  • 8.x users: upgrade to 8.14.1 (currently npm’s latest).
  • 7.x users: upgrade to 7.30.4 or later. npm’s seven dist-tag currently points to 7.30.5, a follow-up release published shortly after 7.30.4.
npm install undici@^8.14.1
# or, on the 7.x line
npm install undici@^7.30.4

npm ls undici   # find every copy, including transitive ones

Undici 8 requires Node.js 22.19.0 or newer, according to its engines field.

Don’t forget the copy inside Node.js

Node’s global fetch() uses a copy of undici bundled into Node itself. Upgrading the npm package does not change it. Check which copy your runtime has:

node -e "console.log(process.versions.undici)"

On my Node 24.22.1 machine this printed 7.30.1. That copy only changes when you upgrade Node.js, so watch the Node.js security release announcements. Meanwhile, read the details below: many issues only apply to specific interceptor or cache setups that the default fetch() path doesn’t use.

The high-severity issues, in plain English

Crashes a malicious server can trigger

Several bugs let a hostile server end your process with an uncaught exception, which is a classic denial of service:

  • stream() with a streaming request body (CVE-2026-139829): an error on the upload after the response started reached the handler twice and threw an uncaught TypeError. A malicious HTTP/2 server could trigger it by destroying the session mid-upload.
  • Retry interceptor with tuple headers (CVE-2026-138000, 8.12.0–8.14.0): if headers were passed as [name, value] pairs and the retry interceptor was composed outside a header-normalising interceptor like dns, a server closing a resumable response mid-body crashed the process.
  • Dump + retry interceptors (CVE-2026-135194, 8.10.2–8.14.0, medium): a server that announced a longer body than it sent could make the default retry policy throw on an internal client with no listener.
  • On the 7.x line only, CVE-2026-141997 fixed an AssertionError crash in the HTTP/1.1 client when a server closed the connection while the app was applying backpressure. This affected both request() and fetch() in 7.26.0–7.30.3.

TLS checks that didn’t apply

  • Redirects kept the wrong TLS servername (CVE-2026-141996): with interceptors.redirect() and a servername (set by you or by interceptors.dns()), a cross-origin redirect verified the new host’s certificate against the original host’s name. Someone holding a valid certificate for the first host who could intercept traffic to the redirect target could impersonate it.
  • EnvHttpProxyAgent ignored target TLS options on some routes (CVE-2026-139849): depending on HTTP_PROXY, HTTPS_PROXY and NO_PROXY, your private CA, certificate pinning, client certificate or rejectUnauthorized setting could be quietly replaced by Node’s defaults. Now connect takes precedence over requestTls, which takes precedence over tls, on every route.

Shared cache poisoning

If you use undici’s cache interceptor as a shared cache (several users or tenants behind one process), three bugs could serve one caller’s response to another:

  • A redirect hop whose path started with // was recorded as protocol-relative, so compose(redirect(), cache()) could store an attacker’s response under a trusted URL (CVE-2026-133890).
  • Background stale-while-revalidate 304s could refresh entries with the wrong Vary fields or a mismatched ETag (CVE-2026-139839 and CVE-2026-129981, medium).
  • An explicit Host header was ignored when building the cache key (CVE-2026-139823, medium). Persistent stores such as SqliteCacheStore filled before the upgrade may still hold bad entries and should be cleared.

Memory and CPU exhaustion

  • MemoryCacheStore and SqliteCacheStore counted only payload bytes, so a response sent in many tiny chunks could exhaust memory (CVE-2026-137980). Small chunks are now merged.
  • A malicious HTTP/2 origin could make undici replay a held request without limit (CVE-2026-137987). Held requests are now charged against the GOAWAY replay budget.
  • A quadratic regex in Cache-Control and Vary trimming could block the event loop (CVE-2026-132045, low). The default fetch() and request() paths weren’t affected.

Proxy credentials shared between agents

ProxyAgent added proxy credentials directly to the headers object you passed in (CVE-2026-144348, low). With EnvHttpProxyAgent and different HTTP and HTTPS proxies, one proxy could receive the other’s credentials. Apps that don’t set the headers option aren’t affected.

A quick audit checklist

Search your code for these patterns. If you use them, upgrading is urgent:

grep -rnE "interceptors\.(redirect|retry|cache|dns|dump)|EnvHttpProxyAgent|ProxyAgent|CacheStore|\.compose\(" src/

After upgrading, a composed dispatcher like this one works the same, with the fixes applied:

import { Agent, interceptors, request } from 'undici';

const dispatcher = new Agent().compose(
  interceptors.redirect({ maxRedirections: 3 }),
  interceptors.retry({ maxRetries: 2 }),
);

const { statusCode, body } = await request('https://example.com/', { dispatcher });
console.log(statusCode, (await body.text()).length);

I ran this against undici 8.14.1 on Node 24 and got a 200.

If you run a shared cache

After upgrading, clear any persistent cache store that may hold poisoned entries:

import { unlinkSync, existsSync } from 'node:fs';

const CACHE_FILE = './undici-cache.sqlite'; // your SqliteCacheStore location
if (existsSync(CACHE_FILE)) unlinkSync(CACHE_FILE);

Do this during a deploy, before the new process starts serving traffic.

Defence in depth for crashes

The release fixes the known crash paths. Still, make sure a single bad upstream can’t take your whole service down:

  • Run more than one instance behind a load balancer, with automatic restarts (systemd, PM2, Kubernetes).
  • Log uncaughtException before exiting, so you can see which dependency failed.
  • Put timeouts on every outbound request (headersTimeout, bodyTimeout, or an AbortSignal.timeout()).

Other useful changes in 8.14.1

The release also adds maxRequestsPerClient for HTTP/2, keeps the HTTP/1 headers timeout across interim (1xx) responses, and stops retry and redirect from re-sending an already-consumed streaming body as empty.

Takeaway

Run npm ls undici, upgrade every copy to 8.14.1 or 7.30.4+, and clear persistent cache stores if you used one as a shared cache. Check process.versions.undici and follow Node.js security releases for the copy behind global fetch(). Prioritise services that use redirect, retry or cache interceptors, proxy agents, or HTTP/2 uploads.