fix(deps): update dependency undici to v6 [security]#892
Open
renovate[bot] wants to merge 1 commit intochore/renovateBaseBranchfrom
Open
fix(deps): update dependency undici to v6 [security]#892renovate[bot] wants to merge 1 commit intochore/renovateBaseBranchfrom
renovate[bot] wants to merge 1 commit intochore/renovateBaseBranchfrom
Conversation
Contributor
Author
Branch automerge failureThis PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.
|
71c67dc to
92718af
Compare
92718af to
9638ac5
Compare
9638ac5 to
d4c9897
Compare
d4c9897 to
460d59f
Compare
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:
5.28.4→6.24.0GitHub Vulnerability Alerts
CVE-2025-22150
Impact
Undici
fetch()uses Math.random() to choose the boundary for a multipart/form-data request. It is known that the output of Math.random() can be predicted if several of its generated values are known.If there is a mechanism in an app that sends multipart requests to an attacker-controlled website, they can use this to leak the necessary values. Therefore, An attacker can tamper with the requests going to the backend APIs if certain conditions are met.
Patches
This is fixed in 5.28.5; 6.21.1; 7.2.3.
Workarounds
Do not issue multipart requests to attacker controlled servers.
References
CVE-2025-47279
Impact
Applications that use undici to implement a webhook-like system are vulnerable. If the attacker set up a server with an invalid certificate, and they can force the application to call the webhook repeatedly, then they can cause a memory leak.
Patches
This has been patched in https://github.com/nodejs/undici/pull/4088.
Workarounds
If a webhook fails, avoid keep calling it repeatedly.
References
Reported as: https://github.com/nodejs/undici/issues/3895
CVE-2026-22036
Impact
The
fetch()API supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., Content-Encoding: gzip, br). This is also supported by the undici decompress interceptor.However, the number of links in the decompression chain is unbounded and the default maxHeaderSize allows a malicious server to insert thousands compression steps leading to high CPU usage and excessive memory allocation.
Patches
Upgrade to 7.18.2 or 6.23.0.
Workarounds
It is possible to apply an undici interceptor and filter long
Content-Encodingsequences manually.References
CVE-2026-1525
Impact
Undici allows duplicate HTTP
Content-Lengthheaders when they are provided in an array with case-variant names (e.g.,Content-Lengthandcontent-length). This produces malformed HTTP/1.1 requests with multiple conflictingContent-Lengthvalues on the wire.Who is impacted:
undici.request(),undici.Client, or similar low-level APIs with headers passed as flat arraysPotential consequences:
Content-Lengthheaders (400 Bad Request)Patches
Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.
Workarounds
If upgrading is not immediately possible:
Content-Lengthheaders (case-insensitive) are present before passing headers to undici{ 'content-length': '123' }) rather than an array, which naturally deduplicates by keyCVE-2026-1527
Impact
When an application passes user-controlled input to the
upgradeoption ofclient.request(), an attacker can inject CRLF sequences (\r\n) to:The vulnerability exists because undici writes the
upgradevalue directly to the socket without validating for invalid header characters:Patches
Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.
Workarounds
Sanitize the
upgradeoption string before passing to undici:CVE-2026-2229
Impact
The undici WebSocket client is vulnerable to a denial-of-service attack due to improper validation of the
server_max_window_bitsparameter in the permessage-deflate extension. When a WebSocket client connects to a server, it automatically advertises support for permessage-deflate compression. A malicious server can respond with an out-of-rangeserver_max_window_bitsvalue (outside zlib's valid range of 8-15). When the server subsequently sends a compressed frame, the client attempts to create a zlib InflateRaw instance with the invalid windowBits value, causing a synchronous RangeError exception that is not caught, resulting in immediate process termination.The vulnerability exists because:
isValidClientWindowBits()function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15createInflateRaw()call is not wrapped in a try-catch blockPatches
Has the problem been patched? What versions should users upgrade to?
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
CVE-2026-1526
Description
The undici WebSocket client is vulnerable to a denial-of-service attack via unbounded memory consumption during permessage-deflate decompression. When a WebSocket connection negotiates the permessage-deflate extension, the client decompresses incoming compressed frames without enforcing any limit on the decompressed data size. A malicious WebSocket server can send a small compressed frame (a "decompression bomb") that expands to an extremely large size in memory, causing the Node.js process to exhaust available memory and crash or become unresponsive.
The vulnerability exists in the
PerMessageDeflate.decompress()method, which accumulates all decompressed chunks in memory and concatenates them into a single Buffer without checking whether the total size exceeds a safe threshold.Impact
Patches
Users should upgrade to fixed versions.
Workarounds
No workaround are possible.
Release Notes
nodejs/undici (undici)
v6.24.0Compare Source
What's Changed
075a5ccto9af472bin /build by @dependabot[bot] in #33559af472bto138d0b5in /build by @dependabot[bot] in #3392BodyReadable.bytesby @tsctx in #3391138d0b5to67225d4in /build by @dependabot[bot] in #3398duplexdocs by @Ethan-Arrowood in #342267225d4to858234ain /build by @dependabot[bot] in #341117e6738to30c5be9in /build by @dependabot[bot] in #344330c5be9toa20e858in /build by @dependabot[bot] in #3496a20e858toa17f484in /build by @dependabot[bot] in #3542a17f484toef7b4bbin /build by @dependabot[bot] in #3547ef7b4bbto3cb4748in /build by @dependabot[bot] in #3573pre-commitdependency by @eXhumer in #3599closeon failed WebSocket connection by @eXhumer in #35663cb4748to83b4d7bin /build by @dependabot[bot] in #3621test/fixtures/*.pemby @LiviaMedeiros in #3659ignoreTrailingSlashto MockAgent and.intercept()by @Uzlopak in #3655cacheprop to RequestInit by @rindeal in #356983b4d7btof1b4315in /build by @dependabot[bot] in #3756nowAbsoluteto fast timers by @flakey5 in #3749Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined).
🚦 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.