chore(deps): update dependency jsdom>undici to v8 [security] - #1597
chore(deps): update dependency jsdom>undici to v8 [security]#1597renovate[bot] wants to merge 1 commit into
Conversation
Coverage Report
File CoverageNo changed files found. |
DavidCockerill
left a comment
There was a problem hiding this comment.
Real advisory, wrong remedy — requesting changes on the fix, not the intent.
The advisory checks out: CVE-2026-13697 / GHSA-4cwx-7wf7-3272, High, CVSS 7.4. But worth being precise about exposure before it drives urgency: undici is here only as a transitive dep of jsdom, which is a devDependency test environment. The vulnerable cache interceptor is never used, and nothing reaches a browser or a server. This is a CI-only exposure, not a production one.
The problem is the change itself: the override this edits exists specifically to block this bump, and CI shows why — 64 test files fail because jsdom 29 requires an undici internal that 8.x removed. Thread has two working alternatives; the cleaner is to land #1596 (jsdom v30) and then delete this override entirely.
— Reviewed by DAIvid (Claude Opus 5)
| # undici 7.x until a jsdom release supports undici 8, otherwise its tests crash | ||
| # with "Cannot find module 'undici/lib/handler/wrap-handler.js'". | ||
| 'jsdom>undici': '^7.28.0' | ||
| 'jsdom>undici': '^8.9.0' |
There was a problem hiding this comment.
This override exists to prevent exactly this bump — the comment three lines up predicts the failure, and CI reproduces it: 64 test files die with Cannot find module 'undici/lib/handler/wrap-handler.js'. jsdom 29.1.1's jsdom-dispatcher.js:8 still requires that internal path, and undici 8.7/8.9 don't ship it.
Two better remedies:
- Land chore(deps): update dependency jsdom to v30 #1596 first (jsdom v30 depends on
undici: ^8.9.0) and delete this override outright — the general'undici@>=7.0.0': '^8.0.0'then covers jsdom. This is the one I'd take. - If chore(deps): update dependency jsdom to v30 #1596 stalls, set
'^7.29.0'— the patched 7.x release for GHSA-4cwx-7wf7-3272, which also satisfies jsdom 29's^7.25.0. One character, advisory cleared, tests green.
Exposure is CI-only either way (see the summary).
This PR contains the following updates:
^7.28.0→^8.9.0undici vulnerable to cross-user information disclosure and parse-time crash via degenerate private cache directives
CVE-2026-13697 / GHSA-4cwx-7wf7-3272
More information
Details
Summary
Two issues in undici's cache interceptor, both fixed by the same patch on
lib/util/cache.js:Cache-Control: privatedirectives such asprivate=""orprivate=","can be incorrectly stored in the default shared cache, then served to a later caller with the same cache key.privatedirectives in the same header (such aspublic, max-age=60, private, private="hdr") cause an uncaughtTypeErrorin the cache-control parser, terminating the request.Impact
Shared-cache disclosure
Applications using
interceptors.cache()in shared mode may cache a user-specific response and serve it to a later caller with the same cache key. This can disclose private response bodies and headers, includingSet-Cookie.Required conditions:
Cache-Control: public, max-age=300, private="";Varyheader.Parse-time crash
Applications using
interceptors.cache()against an upstream that returns aCache-Controlheader combining unqualifiedprivatewith qualifiedprivate="..."see an uncaughtTypeError: output.private.concat is not a functionduring response handling. The request rejects; depending on the consumer's error handling, the process may exit.Details
private=""is parsed as{ private: [''] }. The shared-cache guard only rejectsprivate === true, so the response can be stored. When served from cache, the previous user's body and headers may be returned to a different user.For the crash variant, an unqualified
privatedirective setsoutput.private = true, then a subsequent qualifiedprivate="hdr"directive attemptsoutput.private.concat(['hdr']), which throws because boolean has noconcatmethod.The patch routes the qualified-directive path through a shared helper that normalizes empty-after-trim arrays to
trueand preserves existingtruevalues, closing both vectors.Patches
Upgrade to
undici7.29.0 or 8.9.0. Both releases fix the qualifiedprivatedirective handling that caused the shared-cache storage and the parser crash.Workarounds
Until patched, avoid shared
interceptors.cache()for user-specific responses, usetype: 'private', or disable caching for affected origins.Credit
Disclosure variant reported by @h0rk1p via HackerOne report #3817497.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to downstream response desynchronization via retry interceptor
CVE-2026-16728 / GHSA-8xcm-r25x-g524
More information
Details
Impact
Undici's
interceptors.retry()can deliver a response whose body length does not match theContent-Lengthheader exposed to the application after a retry or resume of a partial response. Applications that useinterceptors.retry()and forward upstream response headers and bodies downstream, for example proxy or gateway applications, may emit an invalid HTTP response with a staleContent-Lengthheader. This can lead to downstream response desynchronization, connection hangs, or response corruption in clients or intermediaries that rely on the forwarded framing metadata.A malicious or faulty upstream can respond to a range request with a
206 Partial Contentresponse such as:and then send only 99 bytes before closing the socket.
interceptors.retry()can then retry withRange: bytes=99-99, receive the final byte, and deliver a 100-byte body to the application while the response headers still containContent-Length: 300from the first response.The bug requires
interceptors.retry()to be enabled, an upstream that returns a partial response with a mismatched framing header, and a downstream forwarder that does not remove or recalculateContent-Length.Patches
Patched in undici v6.28.0, v7.29.0, and v8.9.0. Users should upgrade to one of these versions or later.
Workarounds
interceptors.retry()for untrusted upstreams.Content-Lengthbefore forwarding a response body assembled or transformed by Undici.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields
CVE-2026-16729 / GHSA-v3r7-h72x-cjcm
More information
Details
Impact
The
setCookiefunction has two attribute injection paths.validateCookieDomaindoes not reject semicolons (validateCookiePathalready does at 0x3B), so adomainvalue likeexample.com; SameSite=Nonelands verbatim asDomain=example.com; SameSite=None. Theunparsedarray's loop only checks each entry contains=and does not sanitize values, so an entry likeX-Custom=val; HttpOnlylands unchanged, injectingHttpOnlywithout the caller settingcookie.httpOnly = true.Applications that pass user-controlled input to these fields, typically multi-tenant or reverse-proxy servers that scope session cookies to a tenant-supplied domain, can have SameSite CSRF protections bypassed,
SecureorHttpOnlyforced or stripped, or the intended SameSite tier overridden.Patches
Patched in undici v6.28.0, v7.29.0, and v8.9.0.
Workarounds
domainvalues against the RFC 1034 letter-digit-hyphen set before passing tosetCookie.unparsedfield.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to cross-user information disclosure via whitespace around equals in Cache-Control directives
CVE-2026-14643 / GHSA-jr45-8vmc-qm54
More information
Details
Impact
Undici's cache interceptor mishandles optional whitespace (OWS) placed around the
=of a qualifiedno-cacheorprivateCache-Control directive, such asno-cache ="authorization"(OWS before=) orno-cache= "authorization"(OWS after=). The parser either drops the directive entirely or stores a field name with literal quote characters, so the downstream cache decisions do not recognize the qualification and the response is stored.In shared-cache mode, this allows a response containing one user's authenticated data to be served from cache to a subsequent caller, including an unauthenticated caller, when both requests resolve to the same cache key. The impact class is identical to CVE-2026-9678 (GHSA-pr7r-676h-xcf6); this advisory covers the whitespace-around-
=bypass that the earlier fix did not normalize.Affected applications are those that explicitly enable the cache interceptor (
interceptors.cache()) in shared mode, forwardAuthorizationheaders upstream, and receive cacheable responses with qualifiedprivateorno-cachedirectives whose field-name list is padded with OWS around the=.Patches
Upgrade to undici v7.29.0 or v8.9.0.
Workarounds
If upgrade is not immediately possible, disable shared-cache mode for traffic that includes
Authorizationheaders, avoid caching responses to authenticated requests, or addVary: Authorizationupstream.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to CRLF Injection via blob-like body 'type' property
CVE-2026-15157 / GHSA-m8rv-5g2x-5cg5
More information
Details
Impact
When an application passes a duck-typed blob-like body to undici's HTTP/1.1 dispatcher (via
request(),stream(),pipeline(), ordispatch()) with a.typederived from untrusted input, an attacker can inject CRLF sequences (\r\n) to append arbitrary HTTP headers and potentially smuggle a second request past the upstream.The vulnerable branch in
lib/dispatcher/client-h1.jspushesbody.typedirectly into the outgoing headers with no validation, while every other header path in undici goes throughisValidHeaderValue():The bug requires a hand-rolled duck-typed blob object or a Blob subclass with a controlled
.type. NativeBlobis safe because its constructor strips CRLF from.type.fetch()is unaffected because it validates via theHeadersclass. Ecosystem consumers that build duck-typed blob shapes from user input includeform-data-encoder,formdata-polyfill, andformdata-node.Same defect class as
CVE-2022-35948(explicitcontent-typesink, fixed in undici 5.8.2) andCVE-2026-1527(upgradeoption sink, fixed in 6.24.0 / 7.24.0), both closed by addingisValidHeaderValue()on their respective sinks. This branch was missed.Patches
Patched in undici v6.28.0, v7.29.0, and v8.9.0. Users should upgrade to one of these versions or later.
Workarounds
content-typeheader on the request options (skips the vulnerable branch).Blob(orfetch-blob) instead of a hand-rolled duck-typed object..type.fetch()instead of the non-fetchAPIs.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nodejs/undici (jsdom>undici)
v8.9.0Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v8.8.0...v8.9.0
v8.8.0Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v8.7.0...v8.8.0
v8.7.0Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v8.6.0...v8.7.0
v8.6.0Compare Source
v8.5.0Compare Source
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.
Summary
32dbf0b3b4c287b342d49559a516f870cb105d7c5655ea435655ea436ea54ef8High severity
WebSocket DoS via fragment count bypass — CVE-2026-12151
GHSA-vxpw-j846-p89q · CWE-400, CWE-770
Fix:
32dbf0b3websocket: limit the number of fragments in a message (alsoc5ed7875handle 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.
new WebSocket(...)orWebSocketStreamagainst untrusted endpoints.
WebSocket DoS via cumulative fragment bypass — CVE-2026-9675
GHSA-38rv-x7px-6hhq · CWE-400, CWE-770
Fix:
b4c287b3fix(websocket): enforce max payload size across fragmentsUndici 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).
TLS certificate validation bypass in SOCKS5 ProxyAgent — CVE-2026-9697
GHSA-vmh5-mc38-953g · CWE-295
Fix:
42d49559fix: honor requestTls when proxy is SOCKS5The
ProxyAgentsilently discarded therequestTlsoption when configured witha SOCKS5 proxy. TLS connections through the SOCKS5 tunnel ignored user-configured
parameters such as
ca,cert,key,rejectUnauthorized, andservername,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.
ProxyAgent/Socks5ProxyAgentover SOCKS5 that rely onrequestTls.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:
a516f870fix(socks5-proxy-agent): use per-origin pools to prevent cross-origin routing (#5041)Socks5ProxyAgentreused a single connection pool across different originswithout 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.
Socks5ProxyAgentacross multiple origins(introduced via #4385).
Moderate severity
Cross-user information disclosure via shared cache whitespace bypass — CVE-2026-9678
GHSA-pr7r-676h-xcf6 · CWE-524
Fix:
cb105d7cfix(cache): trim qualified field namesThe cache interceptor mishandled responses with whitespace-padded
Cache-Controldirectives such asprivate=" authorization". In shared-cachemode this could cause authenticated data to be cached and served to other users.
Authorizationupstream and receive non-canonical qualified directives.caching authenticated responses, or add
Vary: Authorizationupstream.HTTP header injection via Set-Cookie percent-decoding — CVE-2026-9679
GHSA-p88m-4jfj-68fv · CWE-93
Fix:
5655ea43fix(cookies): preserve values and parse SameSite strictlyparseSetCookieapplied percent-decoding to cookie values, turning encodedsequences like
%0D%0Aand%00into literal bytes, contrary to RFC 6265 §5.4and 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.
NUL,
;, and=.Low severity
Set-Cookie SameSite attribute downgrade — CVE-2026-11525
GHSA-g8m3-5g58-fq7m · CWE-183
Fix:
5655ea43fix(cookies): preserve values and parse SameSite strictlyThe cookie parser accepted
SameSitevalues containingStrict,Lax, orNoneas substrings rather than requiring exact matches per RFC 6265. Valueslike
SameSite=NoneOfYourBusinessparsed asNone, andSameSite=StrictLaxparsed as
Lax, silently weakening cookie security policies for apps thatforward parsed attributes.
HTTP response queue poisoning via keep-alive socket reuse — CVE-2026-6733
GHSA-35p6-xmwp-9g52 · CWE-367 (TOCTOU race condition)
Fix:
6ea54ef8fix: guard idle socket validation to skip fresh sockets, hardened byc9fbe9d2keep idle validation on native timers (#5397) andac5394b8keep idle validation on global timers (#5407)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.
keep-alive reuse.
keepAliveTimeout: 0on theClient 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.)
#5408don't rewindkPendingIdxpast in-flight requests ·#5391allow h2 POST request multiplexing ·#5406reap idle HTTP/2 sessions ·#5410preserve h2 queue on out-of-order completion#5416addbodyMixin.textStream()·#5418align EventSource with spec#5413document request header validation ·#5383absorb h2 stream timeout resets (test) ·#5420remove stale repro + lint ·#5426extend Windows CI timeout ·#5427detect available python in WPT runnerFull changelog:
v8.4.1...v8.5.0.Credits
Per-advisory credits (as recorded in each GHSA):
v8.4.1Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v8.4.0...v8.4.1
v8.4.0Compare Source
What's Changed
npm ciinstead ofnpm installby @aduh95 in #5315addAbortListenerutil by @aduh95 in #5317kEnumerablePropertyatomically by @aduh95 in #5332regex.execinstead ofstring.matchby @aduh95 in #5331preferH2connector option to offer h2 first in ALPN by @Antamansid in #5327New Contributors
Full Changelog: nodejs/undici@v8.3.0...v8.4.0
v8.3.0Compare Source
What's Changed
Configuration
📅 Schedule: (in timezone America/New_York)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.