You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Undici clears Authorization headers on cross-origin redirects, but does not clear Cookie headers. By design, cookie headers are forbidden request headers, disallowing them to be set in RequestInit.headers in 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.
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.
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.
Undici allows duplicate HTTP Content-Length headers when they are provided in an array with case-variant names (e.g., Content-Length and content-length). This produces malformed HTTP/1.1 requests with multiple conflicting Content-Length values on the wire.
Who is impacted:
Applications using undici.request(), undici.Client, or similar low-level APIs with headers passed as flat arrays
Applications that accept user-controlled header names without case-normalization
Potential consequences:
Denial of Service: Strict HTTP parsers (proxies, servers) will reject requests with duplicate Content-Length headers (400 Bad Request)
HTTP Request Smuggling: In deployments where an intermediary and backend interpret duplicate headers inconsistently (e.g., one uses the first value, the other uses the last), this can enable request smuggling attacks leading to ACL bypass, cache poisoning, or credential hijacking
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:
Validate header names: Ensure no duplicate Content-Length headers (case-insensitive) are present before passing headers to undici
Use object format: Pass headers as a plain object ({ 'content-length': '123' }) rather than an array, which naturally deduplicates by key
Sanitize user input: If headers originate from user input, normalize header names to lowercase and reject duplicates
Undici's HTTP/1.1 client is vulnerable to response queue poisoning on reused keep-alive sockets. An attacker-controlled upstream server can inject an unsolicited HTTP/1.1 response onto an idle socket after a request completes. When the client dispatches the next request on that socket, it associates the injected response with the new request, causing responses to be delivered to the wrong requests.
This requires an attacker-controlled or compromised upstream HTTP/1.1 server and keep-alive connection reuse.
Patches
Upgrade to undici v6.27.0, v7.28.0 or v8.5.0.
Workarounds
Disable keep-alive connection reuse by setting keepAliveTimeout: 0 on the Client or Pool.
undici's cookie parser in parseSetCookie percent-decodes cookie values via qsUnescape, turning encoded sequences like %0D%0A, %00, %3B, and %3D into their literal byte equivalents. RFC 6265 §5.4 does not specify any decoding and browsers do not decode either.
Applications that parse a Set-Cookie header and then forward the parsed value into a response header (proxies, middleware, SSR frameworks) become vulnerable to HTTP response header injection: an attacker-controlled upstream can inject arbitrary Set-Cookie, Location, or Cache-Control headers into the application's downstream response, enabling session fixation, open redirect, or cache poisoning.
Affected applications are those that use undici's cookie parsing (parseSetCookie, parseCookie, getSetCookies) and forward the parsed cookie value into a response header.
If upgrade is not immediately possible, do not forward values returned by parseSetCookie/parseCookie/getSetCookies directly into response headers; sanitize the value first to strip or reject CR, LF, NUL, ;, and = bytes.
When undici parses a Set-Cookie header, it accepts any SameSite attribute value that contains Strict, Lax, or None as a substring, rather than the case-insensitive exact match specified by RFC 6265. Non-spec values are silently mapped to one of the three standard tokens:
SameSite=NoneOfYourBusiness is parsed as None, the most permissive setting.
SameSite=StrictLax is parsed as Lax, a downgrade from Strict.
Affected applications are those that consume Set-Cookie headers from server responses (for example via undici's fetch or proxy code paths) and then forward or rely on the parsed sameSite attribute. A malicious or non-compliant server can coerce the consumer's view of a cookie's SameSite policy to a weaker value, silently degrading the SameSite enforcement the cookie is supposed to provide.
This was introduced in undici 5.15.0 when the cookies feature was added.
Patches
Upgrade to undici v6.27.0, v7.28.0 or v8.5.0.
Workarounds
After parsing a Set-Cookie header, validate that the resulting sameSite attribute is one of 'Strict', 'Lax', or 'None' (exact, case-insensitive) before forwarding or relying on it.
This release line addresses 4 security advisories.
Action required: Upgrade to undici 6.27.0 or later.
npm install undici@^6.27.0
Note on patched version: the v6 fixes shipped in v6.27.0, not 6.26.0
— v6.26.0 contains only the chunked-EOF fix (#5308) and the version bump, none
of the security fixes below.
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. All releases from 6.17.0 onward are affected.
Affected: applications using new WebSocket(...) or WebSocketStream
against untrusted endpoints.
Workaround: none — upgrade is required.
Moderate severity
HTTP header injection via Set-Cookie percent-decoding — CVE-2026-9679
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.
Workaround: sanitize values before forwarding — strip or reject CR, LF,
NUL, ;, and =.
The cookie parser accepted SameSite values containing Strict, Lax, or None 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
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.
Requirements: attacker-controlled/compromised upstream and active
keep-alive reuse.
Workaround: disable keep-alive reuse with keepAliveTimeout: 0 on the
Client or Pool.
Release contents & deliberate backports
v6.27.0 is a security-only release — every change in it is one of the fixes
above, backported to the v6.x maintenance line on purpose:
#5428 — backport of the WebSocket maxPayloadSize fragment-count / cumulative-size limits to v6.x (CVE-2026-12151; this is the v6 counterpart of the v7 backport #5423).
#5400 — idle-socket-validation fix for the queue-poisoning issue (CVE-2026-6733).
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: pnpm-lock.yaml
Scope: all 10 workspace projects
WARN GET https://registry.npmjs.org/@react-enhanced%2Fshared error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Futils error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftranslate error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftypes error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fhooks error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/react/-/react-18.2.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/type-fest/-/type-fest-3.7.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fshared error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Futils error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftranslate error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftypes error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fhooks error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/react/-/react-18.2.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/type-fest/-/type-fest-3.7.2.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
ERR_INVALID_THIS Value of "this" must be of type URLSearchParams
pnpm [ERR_INVALID_THIS]: Value of "this" must be of type URLSearchParams
at Proxy.getAll (node:internal/url:554:13)
at Proxy.<anonymous> (/opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60566:55)
at /opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60628:31
at Array.reduce (<anonymous>)
at Proxy.raw (/opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60627:33)
at new Headers (/opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60512:28)
at getNodeRequestOptions (/opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60861:23)
at /opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60918:25
at new Promise (<anonymous>)
at fetch (/opt/containerbase/tools/pnpm/8.2.0/24.18.0/node_modules/pnpm/dist/pnpm.cjs:60916:14)
WARN GET https://registry.npmjs.org/qrious/-/qrious-4.0.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@1stg/app-config/-/app-config-8.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@1stg/lib-config/-/lib-config-11.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@changesets/cli/-/cli-2.26.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@mdx-js/react/-/react-2.3.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@mdx-js/rollup/-/rollup-2.3.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react/-/react-18.0.33.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/web/-/web-0.0.99.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
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
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.21.2→^6.0.0Undici's cookie header not cleared on cross-origin redirect in fetch
CVE-2023-45143 / GHSA-wqq4-5wpv-mx2g
More information
Details
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.
Severity
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Undici proxy-authorization header not cleared on cross-origin redirect in fetch
CVE-2024-24758 / GHSA-3787-6prv-h9w3
More information
Details
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
Severity
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect
CVE-2024-30261 / GHSA-9qxr-qj54-h672
More information
Details
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
Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Undici's Proxy-Authorization header not cleared on cross-origin redirect for dispatch, request, stream, pipeline
CVE-2024-30260 / GHSA-m4v8-wqvr-p9f7
More information
Details
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.
Severity
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Use of Insufficiently Random Values in undici
CVE-2025-22150 / GHSA-c76h-2ccp-4975
More information
Details
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
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
undici Denial of Service attack via bad certificate data
CVE-2025-47279 / GHSA-cxrh-j4jr-qwg3
More information
Details
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
Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Undici has an HTTP Request/Response Smuggling issue
CVE-2026-1525 / GHSA-2mjp-6q6p-2qxm
More information
Details
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 keySeverity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Undici has CRLF Injection in undici via
upgradeoptionCVE-2026-1527 / GHSA-4992-7rv2-5pvq
More information
Details
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:Severity
CVSS:3.1/AV:N/AC:L/PR:L/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 HTTP response queue poisoning via keep-alive socket reuse
CVE-2026-6733 / GHSA-35p6-xmwp-9g52
More information
Details
Impact
Undici's HTTP/1.1 client is vulnerable to response queue poisoning on reused keep-alive sockets. An attacker-controlled upstream server can inject an unsolicited HTTP/1.1 response onto an idle socket after a request completes. When the client dispatches the next request on that socket, it associates the injected response with the new request, causing responses to be delivered to the wrong requests.
This requires an attacker-controlled or compromised upstream HTTP/1.1 server and keep-alive connection reuse.
Patches
Upgrade to undici v6.27.0, v7.28.0 or v8.5.0.
Workarounds
Disable keep-alive connection reuse by setting
keepAliveTimeout: 0on the Client or Pool.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 HTTP header injection via Set-Cookie percent-decoding
CVE-2026-9679 / GHSA-p88m-4jfj-68fv
More information
Details
Impact
undici's cookie parser in
parseSetCookiepercent-decodes cookie values viaqsUnescape, turning encoded sequences like%0D%0A,%00,%3B, and%3Dinto their literal byte equivalents. RFC 6265 §5.4 does not specify any decoding and browsers do not decode either.Applications that parse a
Set-Cookieheader and then forward the parsed value into a response header (proxies, middleware, SSR frameworks) become vulnerable to HTTP response header injection: an attacker-controlled upstream can inject arbitrarySet-Cookie,Location, orCache-Controlheaders into the application's downstream response, enabling session fixation, open redirect, or cache poisoning.Affected applications are those that use undici's cookie parsing (
parseSetCookie,parseCookie,getSetCookies) and forward the parsed cookie value into a response header.This was introduced in undici 7.0.0 via #3789.
Patches
Upgrade to undici v6.27.0, v7.28.0 or v8.5.0.
Workarounds
If upgrade is not immediately possible, do not forward values returned by
parseSetCookie/parseCookie/getSetCookiesdirectly into response headers; sanitize the value first to strip or reject CR, LF, NUL,;, and=bytes.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 Set-Cookie SameSite attribute downgrade via permissive substring matching
CVE-2026-11525 / GHSA-g8m3-5g58-fq7m
More information
Details
Impact
When undici parses a
Set-Cookieheader, it accepts anySameSiteattribute value that containsStrict,Lax, orNoneas a substring, rather than the case-insensitive exact match specified by RFC 6265. Non-spec values are silently mapped to one of the three standard tokens:SameSite=NoneOfYourBusinessis parsed asNone, the most permissive setting.SameSite=StrictLaxis parsed asLax, a downgrade fromStrict.Affected applications are those that consume
Set-Cookieheaders from server responses (for example via undici'sfetchor proxy code paths) and then forward or rely on the parsedsameSiteattribute. A malicious or non-compliant server can coerce the consumer's view of a cookie's SameSite policy to a weaker value, silently degrading the SameSite enforcement the cookie is supposed to provide.This was introduced in undici 5.15.0 when the cookies feature was added.
Patches
Upgrade to undici v6.27.0, v7.28.0 or v8.5.0.
Workarounds
After parsing a
Set-Cookieheader, validate that the resultingsameSiteattribute is one of'Strict','Lax', or'None'(exact, case-insensitive) before forwarding or relying on it.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).
Release Notes
nodejs/undici (undici)
v6.27.0Compare Source
This release line addresses 4 security advisories.
The v6 line is not affected by the SOCKS5 advisories (GHSA-vmh5-mc38-953g,
GHSA-hm92-r4w5-c3mj), the shared-cache disclosure (GHSA-pr7r-676h-xcf6), or the
8.x-only WebSocket regression (GHSA-38rv-x7px-6hhq).
Summary
b7f252e725efa44725efa447f4c31d60High severity
WebSocket DoS via fragment count bypass — CVE-2026-12151
GHSA-vxpw-j846-p89q · CWE-400, CWE-770
Fix:
b7f252e7Backport WebSocket maxPayloadSize fixes (#5423, backported to v6 in #5428)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. All releases from 6.17.0 onward are affected.
new WebSocket(...)orWebSocketStreamagainst untrusted endpoints.
Moderate severity
HTTP header injection via Set-Cookie percent-decoding — CVE-2026-9679
GHSA-p88m-4jfj-68fv · CWE-93
Fix:
25efa447fix(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.
NUL,
;, and=.Low severity
Set-Cookie SameSite attribute downgrade — CVE-2026-11525
GHSA-g8m3-5g58-fq7m · CWE-183
Fix:
25efa447fix(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:
f4c31d60fix: guard idle socket validation to skip fresh sockets (#5400)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.
Release contents & deliberate backports
v6.27.0 is a security-only release — every change in it is one of the fixes
above, backported to the v6.x maintenance line on purpose:
#5428— backport of the WebSocketmaxPayloadSizefragment-count / cumulative-size limits to v6.x (CVE-2026-12151; this is the v6 counterpart of the v7 backport #5423).#5400— idle-socket-validation fix for the queue-poisoning issue (CVE-2026-6733).The cookie fix (
25efa447,covering both CVE-2026-9679 and CVE-2026-11525) was applied directly to the v6.x
branch. Full changelog:
v6.26.0...v6.27.0.Credits
Per-advisory credits (as recorded in each GHSA):
v6.26.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.25.0...v6.26.0
v6.25.0Compare Source
What's Changed
Full Changelog: nodejs/undici@v6.24.1...v6.25.0
v6.24.1Compare Source
Full Changelog: nodejs/undici@v6.24.0...v6.24.1
v6.24.0Compare Source
Undici v6.24.0 Security Release Notes (LTS)
This release backports fixes for security vulnerabilities affecting the v6 line.
Upgrade guidance
All users on v6 should upgrade to v6.24.0 or later.
Fixed advisories
GHSA-2mjp-6q6p-2qxm / CVE-2026-1525 (Medium)
Inconsistent interpretation of HTTP requests (request/response smuggling class issue).
GHSA-f269-vfmq-vjvj / CVE-2026-1528 (High)
Malicious WebSocket 64-bit frame length handling could crash the client.
GHSA-4992-7rv2-5pvq / CVE-2026-1527 (Medium)
CRLF injection via the
upgradeoption.GHSA-v9p9-hfj2-hcw8 / CVE-2026-2229 (High)
Unhandled exception from invalid
server_max_window_bitsin WebSocket permessage-deflate negotiation.GHSA-vrm6-8vpv-qv8q / CVE-2026-1526 (High)
Unbounded memory consumption in WebSocket permessage-deflate decompression.
Not applicable to v6
>= 7.17.0 < 7.24.0only.Affected and patched ranges (v6)
< 6.24.0, patched6.24.0>= 6.0.0 < 6.24.0, patched6.24.0< 6.24.0, patched6.24.0< 6.24.0, patched6.24.0< 6.24.0, patched6.24.0References
v6.23.0Compare Source
This fixes GHSA-g9mf-h72j-4rw9 and CVE-2026-22036.
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
Configuration
📅 Schedule: (UTC)
🚦 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.