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

- Severity: Medium 5.9 (CVSS:3.1, scored by openjs) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2026-06-17T16:56:18.579Z
- Modified: 2026-09-10T03:51:09.228Z
- Also known as: GHSA-p88m-4jfj-68fv
- Weaknesses: CWE-93
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: openjs

## 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.

(As written by CVE List.)

## Affected

- undici undici: before 6.26.0; from 7.0.0 before 7.28.0; from 8.0.0 before 8.5.0 (not affected: 6.26.0; 7.28.0; 8.5.0)
- undici (npm): before 6.27.0; from 7.0.0 before 7.28.0; from 8.0.0 before 8.5.0
- nodejs undici: before 6.27.0; from 7.0.0 before 7.28.0; from 8.0.0 before 8.5.0

## Every score

- openjs: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/nodejs/undici/security/advisories/GHSA-p88m-4jfj-68fv> (mitigation, vendor-advisory, web)
- <https://cna.openjsf.org/security-advisories.html> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-9679> (advisory)
- <https://github.com/nodejs/undici> (package)

## Sources

- CVE List: [CVE-2026-9679](https://www.cve.org/CVERecord?id=CVE-2026-9679), CVE Terms of Use, modified 2026-06-23
- GitHub Advisory Database: [GHSA-p88m-4jfj-68fv](https://github.com/advisories/GHSA-p88m-4jfj-68fv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-9679](https://nvd.nist.gov/vuln/detail/CVE-2026-9679), Public domain, modified 2026-06-25

---

Page: https://cve.day/CVE-2026-9679 · Whole record: https://cve.day/CVE-2026-9679.json · Rebuilt by cve.day 2026-11-25T22:59:24.991Z
