CVE-2026-9679 undici vulnerable to HTTP header injection via Set-Cookie percent-decoding

Medium 5.9 Published Updated

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.

PackageAffectedFixed in
undici npmAll versions6.27.0
undici npmAll versions6.27.0
undici npmFrom 7.0.07.28.0
undici npmFrom 7.0.07.28.0
undici npmFrom 8.0.08.5.0
undici npmFrom 8.0.08.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.

All Nodejs Undici vulnerabilities

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.

Is CVE-2026-9679 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free