CVE-2026-9679 undici vulnerable to HTTP header injection via Set-Cookie percent-decoding
Attackers can inject HTTP headers via undici's cookie parser, enabling session fixation or cache poisoning in applications forwarding parsed cookies.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-9679?
CVE-2026-9679 is a medium-severity vulnerability in Nodejs Undici, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact: 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.
This was introduced in undici 7.0.0 via PR #3789.
Patches: Upgrade to undici v6.26.0, v7.28.0 or v8.5.0.
Workarounds: 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.
Weakness: CWE-93
Which versions are affected by CVE-2026-9679?
6 open source packages ship an affected version, including undici. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
undici npm | All versions | 6.27.0 |
undici npm | All versions | 6.27.0 |
undici npm | From 7.0.0 | 7.28.0 |
undici npm | From 7.0.0 | 7.28.0 |
undici npm | From 8.0.0 | 8.5.0 |
undici npm | From 8.0.0 | 8.5.0 |
Products include Nodejs Undici.
How do I fix CVE-2026-9679?
Upgrade undici to a fixed version for your release line: 6.27.0, 7.28.0 or 8.5.0.
Is CVE-2026-9679 being exploited?
There is no known exploitation of CVE-2026-9679 in the wild and no public exploit code.
Other vulnerabilities in Nodejs Undici
- CVE-2026-109855 undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
- CVE-2026-109869 undici vulnerable to Denial of Service via unhandled error on excessive content-encodings
- CVE-2026-87018 undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
- CVE-2026-19534 undici vulnerable to Denial of Service via unrequested WebSocket subprotocol
- CVE-2026-12151 undici WebSocket client vulnerable to denial of service via fragment count bypass
Sources
Also known as AZL-91188, CLEANSTART-2026-RT55969, CLEANSTART-2026-YY11286, DEBIAN-CVE-2026-9679, ECHO-d5e0-7732-0397, GHSA-p88m-4jfj-68fv and 18 more.