undici
8.12.4 · 5 Nov 2026MIT355.3M / weekRepositoryHomepagenpmAtom feed
8.13.1 is the newest release of 8.x.
In short
25 security
Security
Fixes 7 advisories that affected 8.4.1
- Highundici WebSocket client vulnerable to denial of service via fragment count bypassGHSA-vxpw-j846-p89q · 19 Jun 2026Fixed in 8.5.0
- Highundici vulnerable to TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgentGHSA-vmh5-mc38-953g · 18 Jun 2026Fixed in 8.5.0
- Highundici WebSocket client vulnerable to denial of service via cumulative fragment bypassGHSA-38rv-x7px-6hhq · 18 Jun 2026Fixed in 8.5.0
- Moderateundici vulnerable to HTTP header injection via Set-Cookie percent-decodingGHSA-p88m-4jfj-68fv · 19 Jun 2026Fixed in 8.5.0
- Moderateundici vulnerable to cross-user information disclosure via shared cache whitespace bypassGHSA-pr7r-676h-xcf6 · 18 Jun 2026Fixed in 8.5.0
- Lowundici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matchingGHSA-g8m3-5g58-fq7m · 19 Jun 2026Fixed in 8.5.0
- Lowundici vulnerable to HTTP response queue poisoning via keep-alive socket reuseGHSA-35p6-xmwp-9g52 · 19 Jun 2026Fixed in 8.5.0
23 advisories affect 8.5.0; 8.12.2 fixes them
- Highundici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirectsGHSA-4w7w-5xrc-9h26 · 27 Oct 2026Fixed in 8.12.2
- Highundici vulnerable to TLS certificate validation bypass via dropped tls options in AgentGHSA-2m5v-pch6-74hx · 27 Oct 2026Fixed in 8.12.2
- Highundici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiationGHSA-qrxm-fqhp-jwvm · 27 Oct 2026Fixed in 8.12.2
- Highundici vulnerable to Denial of Service via unhandled error on excessive content-encodingsGHSA-xjj6-f33q-929c · 23 Oct 2026Fixed in 8.12.2
- Highundici vulnerable to Denial of Service via unrequested WebSocket subprotocolGHSA-rfgv-xxqx-mfg5 · 29 Sep 2026Fixed in 8.10.2
18 more
- Highundici vulnerable to TLS certificate validation bypass via dropped connect options in BalancedPoolGHSA-w293-vg96-wgc3 · 29 Sep 2026Fixed in 8.10.2
- Highundici vulnerable to cross-user information disclosure and parse-time crash via degenerate private cache directivesGHSA-4cwx-7wf7-3272 · 3 Aug 2026Fixed in 8.9.0
- Moderateundici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG bufferingGHSA-9fm3-97px-rjf6 · 27 Oct 2026Fixed in 8.12.2
- Moderateundici vulnerable to Denial of Service via unhandled exception in the decompress interceptorGHSA-55wc-3pg8-jfw6 · 27 Oct 2026Fixed in 8.12.2
- Moderateundici vulnerable to Denial of Service via unbounded memory in the EventSource parserGHSA-4qv8-2p9j-2685 · 23 Oct 2026Fixed in 8.12.2
- Moderateundici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokensGHSA-f72v-6w45-q472 · 23 Oct 2026Fixed in 8.12.2
- Moderateundici vulnerable to Denial of Service via orphaned RetryHandler response bodyGHSA-pmjh-fq2x-6v4x · 29 Sep 2026Fixed in 8.10.2
- Moderateundici vulnerable to Denial of Service via unbounded decompression of compressed responsesGHSA-3xpg-4rpp-hhhm · 29 Sep 2026Fixed in 8.10.2
- Moderateundici vulnerable to cross-user cookie disclosure via Set-Cookie caching in shared cachesGHSA-2jfj-6hjv-fm6j · 29 Sep 2026Fixed in 8.10.2
- Moderateundici vulnerable to Denial of Service via WebSocketStream unclean closeGHSA-rx4f-c7p8-82vq · 29 Sep 2026Fixed in 8.10.2
- Moderateundici vulnerable to Denial of Service via unhandled error in WebSocket permessage-deflate decompressionGHSA-3wwx-pv8p-q78v · 28 Sep 2026Fixed in 8.10.2
- Moderateundici vulnerable to CRLF Injection via blob-like body 'type' propertyGHSA-m8rv-5g2x-5cg5 · 3 Aug 2026Fixed in 8.9.0
- Moderateundici vulnerable to cross-user information disclosure via whitespace around equals in Cache-Control directivesGHSA-jr45-8vmc-qm54 · 3 Aug 2026Fixed in 8.9.0
- Moderateundici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fieldsGHSA-v3r7-h72x-cjcm · 3 Aug 2026Fixed in 8.9.0
- Moderateundici vulnerable to downstream response desynchronization via retry interceptorGHSA-8xcm-r25x-g524 · 3 Aug 2026Fixed in 8.9.0
- Lowundici vulnerable to downstream response splitting via retry interceptorGHSA-r53p-7pc4-xj5r · 29 Sep 2026Fixed in 8.10.2
- Lowundici vulnerable to response truncation via oversized chunked responses in the dump interceptorGHSA-2gqq-gqf2-x968 · 29 Sep 2026Fixed in 8.10.2
- Lowundici vulnerable to caching and replay of unsafe HTTP method responsesGHSA-8436-99hf-9mmv · 29 Sep 2026Fixed in 8.10.2
Release note
Security Release
This release line addresses 8 security advisories. Most are fixed in
v8.5.0; the SOCKS5 pool-reuse issue was fixed earlier in v8.2.0.
Action required: Upgrade to undici 8.5.0 or later.
npm install undici@^8.5.0
Summary
| Advisory | CVE | Severity (CVSS) | Fixed in | Fix commit |
|---|---|---|---|---|
| GHSA-vxpw-j846-p89q | CVE-2026-12151 | High (7.5) | 8.5.0 | 32dbf0b3 |
| GHSA-38rv-x7px-6hhq | CVE-2026-9675 | High (7.5) | 8.5.0 | b4c287b3 |
| GHSA-vmh5-mc38-953g | CVE-2026-9697 | High (7.4) | 8.5.0 | 42d49559 |
| GHSA-hm92-r4w5-c3mj | CVE-2026-6734 | High (7.5) | 8.2.0 | a516f870 |
| GHSA-pr7r-676h-xcf6 | CVE-2026-9678 | Moderate (5.9) | 8.5.0 | cb105d7c |
| GHSA-p88m-4jfj-68fv | CVE-2026-9679 | Moderate (5.9) | 8.5.0 | 5655ea43 |
| GHSA-g8m3-5g58-fq7m | CVE-2026-11525 | Low (3.7) | 8.5.0 | 5655ea43 |
| GHSA-35p6-xmwp-9g52 | CVE-2026-6733 | Low (3.7) | 8.5.0 | 6ea54ef8 |
High severity
WebSocket DoS via fragment count bypass — CVE-2026-12151
GHSA-vxpw-j846-p89q · CWE-400, CWE-770
Fix: 32dbf0b3 websocket: limit the number of fragments in a message (also c5ed7875 handle empty fragments and stream limits)
A malicious WebSocket server can stream a large number of small or empty
continuation frames. Undici enforced a limit on cumulative payload size but did
not limit the number of fragments per message, leading to unbounded memory
growth and denial of service.
- Security
Affected: applications using
new WebSocket(...)orWebSocketStream
against untrusted endpoints. - Security
Workaround: none — upgrade is required.
WebSocket DoS via cumulative fragment bypass — CVE-2026-9675
GHSA-38rv-x7px-6hhq · CWE-400, CWE-770
Fix: b4c287b3 fix(websocket): enforce max payload size across fragments
Undici validated the size of individual frames but did not track cumulative size
across a fragmented message. An attacker could send many small fragments that
each pass per-frame validation but collectively exceed the configured limit,
causing memory exhaustion. This is a regression introduced in 8.1.0 (the
6.x and 7.x lines are not affected).
- Security
Workaround: none — upgrade is required.
TLS certificate validation bypass in SOCKS5 ProxyAgent — CVE-2026-9697
GHSA-vmh5-mc38-953g · CWE-295
Fix: 42d49559 fix: honor requestTls when proxy is SOCKS5
The ProxyAgent silently discarded the requestTls option when configured with
a SOCKS5 proxy. TLS connections through the SOCKS5 tunnel ignored user-configured
parameters such as ca, cert, key, rejectUnauthorized, and servername,
falling back to the default Mozilla CA bundle. Applications relying on
certificate pinning to an internal CA were exposed to man-in-the-middle attacks.
- Security
Affected:
ProxyAgent/Socks5ProxyAgentover SOCKS5 that rely onrequestTls. - Security
Workaround: route traffic through an HTTP-proxy
ProxyAgent, whererequestTlsfunctions correctly.
Cross-origin request routing via SOCKS5 proxy pool reuse — CVE-2026-6734
GHSA-hm92-r4w5-c3mj · CWE-346 · Fixed in 8.2.0
Fix: a516f870 fix(socks5-proxy-agent): use per-origin pools to prevent cross-origin routing
Socks5ProxyAgent reused a single connection pool across different origins
without verifying the pool's origin matched the requested origin. This could
route credentials and request data to unintended destinations, cause responses
from the wrong origin to be trusted, and enable HTTPS→HTTP downgrade.
- Security
Affected: applications using
Socks5ProxyAgentacross multiple origins
(introduced via #4385). - Security
Workaround: use a separate agent instance per origin.
Moderate severity
Cross-user information disclosure via shared cache whitespace bypass — CVE-2026-9678
GHSA-pr7r-676h-xcf6 · CWE-524
Fix: cb105d7c fix(cache): trim qualified field names
The cache interceptor mishandled responses with whitespace-paddedCache-Control directives such as private=" authorization". In shared-cache
mode this could cause authenticated data to be cached and served to other users.
- Security
Affected: apps using the cache interceptor in shared mode that forward
Authorizationupstream and receive non-canonical qualified directives. - Security
Workaround: disable shared-cache mode for authenticated traffic, avoid
caching authenticated responses, or addVary: Authorizationupstream.
HTTP header injection via Set-Cookie percent-decoding — CVE-2026-9679
GHSA-p88m-4jfj-68fv · CWE-93
Fix: 5655ea43 fix(cookies): preserve values and parse SameSite strictly
parseSetCookie applied percent-decoding to cookie values, turning encoded
sequences like %0D%0A and %00 into literal bytes, contrary to RFC 6265 §5.4
and browser behavior. Applications forwarding parsed Set-Cookie values into
response headers were exposed to header injection, enabling session fixation,
open redirects, and cache poisoning. Introduced in 7.0.0 via
#3789.
- Security
Workaround: sanitize values before forwarding — strip or reject CR, LF,
NUL,;, and=.
Low severity
Set-Cookie SameSite attribute downgrade — CVE-2026-11525
GHSA-g8m3-5g58-fq7m · CWE-183
Fix: 5655ea43 fix(cookies): preserve values and parse SameSite strictly
The cookie parser accepted SameSite values containing Strict, Lax, orNone as substrings rather than requiring exact matches per RFC 6265. Values
like SameSite=NoneOfYourBusiness parsed as None, and SameSite=StrictLax
parsed as Lax, silently weakening cookie security policies for apps that
forward parsed attributes.
HTTP response queue poisoning via keep-alive socket reuse — CVE-2026-6733
GHSA-35p6-xmwp-9g52 · CWE-367 (TOCTOU race condition)
Fix: 6ea54ef8 fix: guard idle socket validation to skip fresh sockets, hardened by c9fbe9d2 keep idle validation on native timers (#5397) and ac5394b8 keep idle validation on global timers
An attacker controlling an upstream HTTP/1.1 server could inject unsolicited
responses onto idle keep-alive sockets. On socket reuse, the injected response
was associated with a new request, delivering responses to the wrong requests.
- Security
Requirements: attacker-controlled/compromised upstream and active
keep-alive reuse. - Security
Workaround: disable keep-alive reuse with
keepAliveTimeout: 0on the
Client or Pool.
Also in v8.5.0 (non-security)
v8.5.0 shipped the security fixes above alongside the following changes. These
are not security fixes — they are listed for completeness of the release. (The
two queue-poisoning hardening PRs, #5397
and #5407, are covered under
CVE-2026-6733 above and are not repeated here.)
- Security
HTTP/2:
#5408don't rewindkPendingIdxpast in-flight requests ·#5391allow h2 POST request multiplexing ·#5406reap idle HTTP/2 sessions ·#5410preserve h2 queue on out-of-order completion - Security
Features:
#5416addbodyMixin.textStream()·#5418align EventSource with spec - Security
Docs / CI / tests:
#5413document request header validation ·#5383absorb h2 stream timeout resets (test) ·#5420remove stale repro + lint ·#5426extend Windows CI timeout ·#5427detect available python in WPT runner
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.