-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): update dependency undici@<5.19.1 to v6 [security] #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
134736a to
6556c5e
Compare
c80aee8 to
b834868
Compare
b834868 to
4dc7855
Compare
4dc7855 to
ff90c8e
Compare
ff90c8e to
a98663e
Compare
a98663e to
bc1574f
Compare
bc1574f to
35bbddc
Compare
35bbddc to
6c51cbb
Compare
6c51cbb to
87861a7
Compare
87861a7 to
316a291
Compare
316a291 to
87318ae
Compare
87318ae to
919ec95
Compare
919ec95 to
88864ed
Compare
e09e993 to
8d2131e
Compare
8d2131e to
f6f4cf8
Compare
f6f4cf8 to
b500989
Compare
package.json
Outdated
| "undici@<5.8.0": ">=5.8.0", | ||
| "undici@<=5.8.1": ">=5.8.2", | ||
| "undici@<5.19.1": ">=5.19.1", | ||
| "undici@<5.19.1": ">=6.21.2", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
b500989 to
1e2eb66
Compare
1e2eb66 to
d438f7b
Compare
d438f7b to
c292013
Compare
c292013 to
65e6d16
Compare
886fc6c to
e1d70fa
Compare
e1d70fa to
4907da0
Compare
4907da0 to
f6dc72b
Compare
f6dc72b to
a2e3b30
Compare
a2e3b30 to
7039788
Compare
7039788 to
c00e227
Compare
| "undici@<5.19.1": ">=6.23.0", | ||
| "undici@>=2.0.0 <5.19.1": ">=5.19.1", | ||
| "undici@<5.26.2": ">=5.26.2", | ||
| "undici@<5.28.4": ">=5.28.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The new pnpm override for undici conflicts with existing overrides, creating undefined dependency resolution behavior for overlapping version ranges.
Severity: MEDIUM
Suggested Fix
Remove the conflicting pnpm override rules. The new override on line 53 ("undici@<5.19.1": ">=6.23.0") should be reconciled with the existing rules on lines 54-56 that force undici v5. Consolidate the overrides to have a single, clear rule for each version range to ensure deterministic dependency resolution.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L53-L56
Potential issue: The `package.json` file contains conflicting pnpm overrides for the
`undici` package. The new rule on line 53 (`"undici@<5.19.1": ">=6.23.0"`) forces
`undici` v6 for versions below 5.19.1. However, an existing rule on line 54
(`"undici@>=2.0.0 <5.19.1": ">=5.19.1"`) forces `undici` v5 for an overlapping range.
According to pnpm documentation, when multiple version ranges overlap, the resolution
behavior is undefined. This can lead to non-deterministic dependency resolution when
regenerating the lockfile or updating dependencies, potentially causing unexpected
versions of `undici` to be installed.
Did we get this right? 👍 / 👎 to inform future reviews.
This PR contains the following updates:
>=5.19.1→>=6.23.0GitHub Vulnerability Alerts
CVE-2023-45143
Impact
Undici clears Authorization headers on cross-origin redirects, but does not clear
Cookieheaders. By design,cookieheaders are forbidden request headers, disallowing them to be set inRequestInit.headersin browser environments. Since Undici handles headers more liberally than the specification, there was a disconnect from the assumptions the spec made, and Undici's implementation of fetch.As such this may lead to accidental leakage of cookie to a 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site.
Patches
This was patched in e041de359221ebeae04c469e8aff4145764e6d76, which is included in version 5.26.2.
CVE-2024-24758
Impact
Undici already cleared Authorization headers on cross-origin redirects, but did not clear
Proxy-Authorizationheaders.Patches
This is patched in v5.28.3 and v6.6.1
Workarounds
There are no known workarounds.
References
CVE-2024-30261
Impact
If an attacker can alter the
integrityoption passed tofetch(), they can letfetch()accept requests as valid even if they have been tampered.Patches
Fixed in nodejs/undici@d542b8c.
Fixes has been released in v5.28.4 and v6.11.1.
Workarounds
Ensure that
integritycannot be tampered with.References
https://hackerone.com/reports/2377760
CVE-2024-30260
Impact
Undici cleared Authorization and Proxy-Authorization headers for
fetch(), but did not clear them forundici.request().Patches
This has been patched in nodejs/undici@6805746.
Fixes has been released in v5.28.4 and v6.11.1.
Workarounds
use
fetch()or disablemaxRedirections.References
Linzi Shang reported this.
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-2022-31150
Impact
It is possible to inject CRLF sequences into request headers in Undici.
The same applies to
pathandmethodPatches
Update to v5.8.0
Workarounds
Sanitize all HTTP headers from untrusted sources to eliminate
\r\n.References
https://hackerone.com/reports/409943
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12116
For more information
If you have any questions or comments about this advisory:
CVE-2022-31151
Impact
Authorization headers are already cleared on cross-origin redirect in
https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189, based on https://github.com/nodejs/undici/issues/872.
However, cookie headers which are sensitive headers and are official headers found in the spec, remain uncleared. There also has been active discussion of implementing a cookie store https://github.com/nodejs/undici/pull/1441, which suggests that there are active users using cookie headers in undici.
As such this may lead to accidental leakage of cookie to a 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site.
Patches
This was patched in v5.8.0.
Workarounds
By default, this vulnerability is not exploitable.
Do not enable redirections, i.e.
maxRedirections: 0(the default).References
https://hackerone.com/reports/1635514
https://curl.se/docs/CVE-2018-1000007.html
https://curl.se/docs/CVE-2022-27776.html
For more information
If you have any questions or comments about this advisory:
CVE-2022-35949
Impact
undiciis vulnerable to SSRF (Server-side Request Forgery) when an application takes in user input into thepath/pathnameoption ofundici.request.If a user specifies a URL such as
http://127.0.0.1or//127.0.0.1Instead of processing the request as
http://example.org//127.0.0.1(orhttp://example.org/http://127.0.0.1whenhttp://127.0.0.1 is used), it actually processes the request ashttp://127.0.0.1/and sends it tohttp://127.0.0.1.If a developer passes in user input into
pathparameter ofundici.request, it can result in an SSRF as they will assume that the hostname cannot change, when in actual fact it can change because the specified path parameter is combined with the base URL.Patches
This issue was fixed in
undici@5.8.1.Workarounds
The best workaround is to validate user input before passing it to the
undici.requestcall.For more information
If you have any questions or comments about this advisory:
CVE-2022-35948
Impact
=< undici@5.8.0users are vulnerable to CRLF Injection on headers when using unsanitized input as request headers, more specifically, inside thecontent-typeheader.Example:
The above snippet will perform two requests in a single
requestAPI call:http://localhost:3000/http://localhost:3000/foo2Patches
This issue was patched in Undici v5.8.1
Workarounds
Sanitize input when sending content-type headers using user input.
For more information
If you have any questions or comments about this advisory:
CVE-2023-23936
Impact
undici library does not protect
hostHTTP header from CRLF injection vulnerabilities.Patches
This issue was patched in Undici v5.19.1.
Workarounds
Sanitize the
headers.hoststring before passing to undici.References
Reported at https://hackerone.com/reports/1820955.
Credits
Thank you to Zhipeng Zhang (@timon8) for reporting this vulnerability.
CVE-2023-24807
Impact
The
Headers.set()andHeaders.append()methods are vulnerable to Regular Expression Denial of Service (ReDoS) attacks when untrusted values are passed into the functions. This is due to the inefficient regular expression used to normalize the values in theheaderValueNormalize()utility function.Patches
This vulnerability was patched in v5.19.1.
Workarounds
There is no workaround. Please update to an unaffected version.
References
Credits
Carter Snook reported this vulnerability.
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
Release Notes
nodejs/undici (undici@<5.19.1)
v6.23.0Compare Source
Full Changelog: nodejs/undici@v6.22.0...v6.23.0
v6.22.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.21.3...v6.22.0
v6.21.3Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.21.2...v6.21.3
v6.21.2Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v6.21.1...v6.21.2
v6.21.1Compare Source
Fixes CVE CVE-2025-22150 GHSA-c76h-2ccp-4975 (embargoed until 22-01-2025).
What's Changed
183f8e9to v6.x by @ggoodman in #3855Full Changelog: nodejs/undici@v6.21.0...v6.21.1
v6.21.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.20.1...v6.21.0
v6.20.1Compare Source
What's Changed
BodyReadable.bytesby @github-actions in #3711Full Changelog: nodejs/undici@v6.20.0...v6.20.1
v6.20.0Compare Source
What's Changed
v6.xbranch) by @eXhumer in #3531Full Changelog: nodejs/undici@v6.19.8...v6.20.0
v6.19.8Compare Source
Full Changelog: nodejs/undici@v6.19.7...v6.19.8
v6.19.7Compare Source
Full Changelog: nodejs/undici@v6.19.6...v6.19.7
v6.19.6Compare Source
Full Changelog: nodejs/undici@v6.19.5...v6.19.6
v6.19.5Compare Source
Full Changelog: nodejs/undici@v6.19.4...v6.19.5
v6.19.4Compare Source
Full Changelog: nodejs/undici@v6.19.3...v6.19.4
v6.19.3Compare Source
Full Changelog: nodejs/undici@v6.19.2...v6.19.3
v6.19.2Compare Source
What's Changed
huskyashusky installis deprecated by @jazelly in #3340Full Changelog: nodejs/undici@v6.19.1...v6.19.2
v6.19.1Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.19.0...v6.19.1
v6.19.0Compare Source
What's Changed
9e8f45ftodd7e693in /build by @dependabot in #3309dd7e693toe6d4495in /build by @dependabot in #3313e6d4495to075a5ccin /build by @dependabot in #3326bodyTimeoutin the request by @jakecastelli in #3324New Contributors
Full Changelog: nodejs/undici@v6.18.2...v6.19.0
v6.18.2Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.18.1...v6.18.2
v6.18.1Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v6.18.0...v6.18.1
v6.18.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.17.0...v6.18.0
v6.17.0Compare Source
What's Changed
487dc5dto9e8f45fin /build by @dependabot in #3271New Contributors
Full Changelog: nodejs/undici@v6.16.1...v6.17.0
v6.16.1Compare Source
What's Changed
fire-and-forget.jsby @tsctx in #3229Full Changelog: nodejs/undici@v6.16.0...v6.16.1
v6.16.0Compare Source
What's Changed
9459e24to487dc5din /build by @dependabot in #3195New Contributors
Full Changelog: nodejs/undici@v6.15.0...v6.16.0
v6.15.0Compare Source
What's Changed
6d0f18atodb8772din /build by @dependabot in #3163New Contributors
Full Changelog: nodejs/undici@v6.14.1...v6.15.0
v6.14.1Compare Source
What's Changed
ad255c6to6d0f18ain /build by @dependabot in #3154Full Changelog: nodejs/undici@v6.14.0...v6.14.1
v6.14.0Compare Source
What's Changed
New Contributors
Full Changelog: nodejs/undici@v6.13.0...v6.14.0
v6.13.0Compare Source
What's Changed
9696b26toad255c6in /build by @dependabot in #3073ad255c6to6d0f18ain /build by @dependabot in #3096New Contributors
Full Changelog: nodejs/undici@v6.12.0...v6.13.0
v6.12.0Compare Source
What's Changed
Configuration
📅 Schedule: Branch creation - "" (UTC), 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.