Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
AV:N because exploitation requires a network-accessible upstream server under attacker control; AC:H for that server-control prerequisite; PR:N as no client-side privileges are needed; I:L for integrity impact limited to SameSite policy downgrade; C and A remain N.
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Lifecycle Timeline
2Blast Radius
ecosystem impact- 28 npm packages depend on undici (16 direct, 23 indirect)
Ecosystem-wide dependent count for version 7.0.0.
DescriptionCVE.org
Impact: 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. For example, SameSite=NoneOfYourBusiness is parsed as None (the most permissive setting), and 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.26.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.
AnalysisAI
SameSite attribute parsing in undici's cookie implementation uses substring matching instead of the case-insensitive exact match required by RFC 6265, enabling a malicious or non-compliant upstream server to silently downgrade a cookie's SameSite enforcement to a more permissive value. All undici installations from v5.15.0 onward through the unpatched release branches are affected when consuming Set-Cookie headers via undici's fetch or proxy code paths and forwarding or relying on the parsed sameSite attribute. No public exploit has been identified and no CISA KEV listing exists at time of analysis; however, the integrity impact is concrete in architectures where SameSite policy enforcement is delegated to the parsed cookie attribute.
Technical ContextAI
undici is a high-performance, ground-up HTTP/1.1 client for Node.js, maintained by the OpenJS Foundation and widely used as the underlying fetch and proxy implementation in Node.js applications. The vulnerability resides in the cookie parsing component introduced in v5.15.0. CWE-183 (Permissive List of Allowed Inputs) identifies the root cause: the parser accepts any SameSite token value that contains 'Strict', 'Lax', or 'None' as a substring, rather than validating against the exact case-insensitive token set mandated by RFC 6265 Section 4.1.1. This causes values such as 'SameSite=NoneOfYourBusiness' to be silently normalized to SameSite=None (the most permissive setting), and 'SameSite=StrictLax' to be normalized to SameSite=Lax (a downgrade from Strict). The affected CPE cpe:2.3:a:undici:undici:*:*:*:*:*:*:*:* spans all platforms and architectures. Applications acting as reverse proxies, API gateways, or server-side fetch clients that consume and forward or trust the parsed sameSite attribute are the primary at-risk surface; applications that never inspect or relay this attribute are not affected.
RemediationAI
The primary fix is to upgrade undici to v6.26.0, v7.28.0, or v8.5.0, which implement spec-compliant case-insensitive exact matching for SameSite attribute values per RFC 6265. Full details are in the vendor advisory at https://github.com/nodejs/undici/security/advisories/GHSA-g8m3-5g58-fq7m. If an immediate upgrade is not feasible, the vendor-recommended workaround is to add application-level validation after parsing any Set-Cookie header: check that the resulting sameSite attribute is exactly one of 'Strict', 'Lax', or 'None' (case-insensitive comparison), and reject or treat as maximally restrictive any value outside this set before forwarding or relying on it. This workaround requires code changes at the application layer and does not remediate the underlying library defect, meaning future undici updates may re-expose the issue if the workaround is removed. Applications that do not consume, forward, or make trust decisions based on the parsed sameSite attribute require no immediate action but should still upgrade to eliminate the defect.
undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forge
Memory exhaustion denial of service in the undici WebSocket client (versions 6.17.0 and later) allows a malicious or com
Cross-user information disclosure in undici's cache interceptor allows authenticated users' responses to be served from
Cookie attribute injection in undici's setCookie function allows attacker-controlled domain values or unparsed array ent
Authorization headers are cleared on cross-origin redirect. Rated medium severity (CVSS 6.5), this vulnerability is remo
`Undici.ProxyAgent` never verifies the remote server's certificate, and always exposes all request & response data to th
CRLF injection in undici's HTTP/1.1 dispatcher enables HTTP header injection and potential request smuggling when applic
Undici is an HTTP/1.1 client for Node.js. Rated medium severity (CVSS 5.4), this vulnerability is remotely exploitable,
undici is an HTTP/1.1 client, written from scratch for Node.js.`=< undici@5.8.0` users are vulnerable to _CRLF Injection
Cross-user information disclosure and a parse-time denial of service in undici's HTTP cache interceptor affect versions
Cross-origin request misrouting in undici's Socks5ProxyAgent (introduced in 7.23.0, affecting all releases through 8.1.0
Denial-of-service in the undici WebSocket client (Node.js HTTP/WebSocket library) version 8.1.0 through versions prior t
Same weakness CWE-183 – Permissive List of Allowed Inputs
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-37758
GHSA-g8m3-5g58-fq7m