Repository navigation
chore(deps): update dependency undici to v7.30.1 [security] - #1323
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
7.29.1→7.30.1undici 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 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).
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 downstream response splitting via retry interceptor
CVE-2026-18540 / GHSA-r53p-7pc4-xj5r
More information
Details
Impact
Undici's
interceptors.retry()can resume a request after a partial response and append the resumed bytes to an already partially delivered body, while the application still receives the original response's status and headers. When that response carried aContent-Length, the application can receive a longer body. Applications that forward Undici's status, headers, and body downstream without recalculating framing, for example proxy or gateway applications, may emit a response whose body exceeds the forwardedContent-Length, and the excess bytes can be read as the start of a subsequent HTTP response (downstream response splitting or desynchronization).For example, a
404 Not FoundwithContent-Length: 2that sends one byte then closes can be resumed with an open-endedRangerequest, and the resumed206 Partial Contentbytes are appended, so the application receives more than two body bytes while still seeingContent-Length: 2. The bug requiresinterceptors.retry()enabled, an attacker-controlled or faulty upstream, and a downstream forwarder that does not recalculateContent-Length.Patches
Patched in undici v6.28.1, v7.29.1, and v8.10.2. Upgrade to one of these or later.
Workarounds
interceptors.retry()for untrusted upstreams, or setmaxRetries: 0.Content-Lengthbefore forwarding a response body assembled by Undici.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
CVE-2026-109841 / GHSA-f72v-6w45-q472
More information
Details
Impact
undici's
fetch()verifies Subresource Integrity (SRI) metadata by looking up the algorithm token in a lowercase-only set, but the SRI specification defines a valid token by its ASCII-lowercase form. A correct but non-lowercase token such asSHA256-...orSha256-...is therefore treated as unknown and skipped. When no recognized algorithm remains, undici treats the integrity list as empty and accepts the response, so a server that returns a body different from the pinned digest passes the check.An application that pins a response with a valid uppercase or mixed-case SRI token receives attacker-controlled bytes with no integrity error. The attacker needs only to control the response body, not the application's integrity metadata. The issue affects response integrity only. The regression was introduced in undici 7.15.0; releases 7.14.0 and earlier lowercase the token and are not affected.
Patches
Upgrade to
7.30.1or8.12.2. undici now normalizes the algorithm token to ASCII lowercase before validating it and before selecting the strongest algorithm, so case variants of SHA-256, SHA-384, and SHA-512 are verified correctly.Workarounds
Use lowercase algorithm tokens (
sha256,sha384,sha512) inintegritymetadata.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to Denial of Service via unbounded memory in the EventSource parser
CVE-2026-109924 / GHSA-4qv8-2p9j-2685
More information
Details
Impact
undici's
EventSourceclient can be driven to exhaust process memory by a malicious or compromised Server-Sent Events peer. By sending millions of tiny completeddata:fields with no blank event separator, or a single unfinished line split across many chunks, the parser retains a growing amount of per-field and per-chunk state. The byte-basedmaxEventSizeandmaxResponseSizelimits do not bound that retained state, andmaxResponseSizeis enforced on the compressed body before decompression, so a small compressed response can expand into enough retained memory to terminate the process. The application only needs to maintain anEventSourceconnection to an untrusted peer, which controls only the response. Availability is the only impact.Patches
Upgrade to
6.29.1,7.30.1, or8.12.2, which bound the retained EventSource parser state (the number ofdatafields and buffered chunks, the unfinished-line length, and per-field byte totals) independently of the byte limits.Workarounds
None.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici vulnerable to Denial of Service via unhandled error on excessive content-encodings
CVE-2026-109869 / GHSA-xjj6-f33q-929c
More information
Details
Impact
undici's
fetch()crashes the Node.js process when a malicious server returns a response with more than five content codings and closes the connection before sending the body. undici rejects such responses (a content-encoding limit), but it created the internal response stream before that check and returned without attaching an error listener or aborting the request. The early close then surfaces a content-length mismatch on that orphaned internal stream, which Node.js treats as an unhandlederrorand terminates the process. A remote, unauthenticated server can trigger this with a single response, even when the application correctly catches thefetch()rejection. undici 6.x, 7.x, and 8.x are affected.Patches
Upgrade to
6.29.1,7.30.1, or8.12.2. undici now validates the content-encoding chain before creating the internal body stream and aborts the response when the limit is exceeded, so no error can surface on an orphaned stream.Workarounds
None.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nodejs/undici (undici)
v7.30.1Compare Source
Security fixes
High severity
Denial of service via TLS 1.2 certificate-changing renegotiation
CVE-2026-87018 · GHSA-qrxm-fqhp-jwvm
A malicious or compromised HTTPS server could crash the Node.js process by initiating TLS 1.2 renegotiation and presenting a different, CA-trusted certificate whose hostname did not match the requested host. The resulting socket error reached an assertion in undici's HTTP/1.1 and HTTP/2 connection handling. This release handles post-connect certificate errors without terminating the process.
TLS certificate validation bypass through dropped
AgentoptionsCVE-2026-109383 · GHSA-2m5v-pch6-74hx
Agentused a JSON-based clone for constructor options, which silently removed function-valued TLS options such ascheckServerIdentity. Applications relying on custom certificate or public-key verification could therefore accept a certificate that the callback was intended to reject. This release preserves TLS options when creating per-origin dispatchers.Cache poisoning and cross-user disclosure through cross-origin redirects
CVE-2026-109829 · GHSA-4w7w-5xrc-9h26
When an originless
Agentcombined redirect and shared-cache interceptors ascompose(redirect(), cache()), a response from a cross-origin redirect could be stored under the original URL. This could allow persistent cache poisoning or disclosure of user-specific responses to later callers. This release verifies the response origin before caching and preserves redirect-hop cache-control policy.Denial of service through excessive
Content-EncodingvaluesCVE-2026-109869 · GHSA-xjj6-f33q-929c
A malicious HTTP server could crash the Node.js process by returning more than five content codings and closing the connection before sending the body. Although
fetch()rejected the response, an error from an orphaned internal stream could remain unhandled. This release validates the content-encoding chain before creating the body stream and aborts oversized chains safely.Medium severity
Denial of service through the
decompressinterceptorCVE-2026-87029 · GHSA-55wc-3pg8-jfw6
An exception thrown by a downstream response handler from an asynchronous decompression callback could escape as an uncaught exception. A server could trigger this when
decompresswas composed with a handler such asdumpwith a size limit. This release converts downstream handler exceptions into per-request errors.Subresource Integrity bypass with non-lowercase algorithm tokens
CVE-2026-109841 · GHSA-f72v-6w45-q472
fetch()treated valid mixed-case or uppercase SRI algorithm tokens, such asSHA256, as unknown and could accept a response whose body did not match the configured digest. This release normalizes algorithm tokens before validation and digest selection.Denial of service through unbounded EventSource parser state
CVE-2026-109924 · GHSA-4qv8-2p9j-2685
A malicious Server-Sent Events endpoint could exhaust process memory by sending many tiny
data:fields without completing an event, or by splitting an unfinished line across many chunks. This release bounds retained EventSource parser state, including field counts, buffered chunks, unfinished-line length, and retained field data.Denial of service through unbounded automatic WebSocket PONG buffering
CVE-2026-109932 · GHSA-9fm3-97px-rjf6
A malicious WebSocket server could exhaust process memory by flooding the client with PING frames while not reading the automatic PONG responses. undici previously ignored socket backpressure and allowed the outbound queue to grow without bound. This release pauses frame parsing when PONG writes encounter backpressure and resumes after the socket drains.
What's Changed
New Contributors
Full Changelog: nodejs/undici@v7.30.0...v7.30.1
v7.30.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v7.29.1...v7.30.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.