{"id":"CVE-2026-9679","published":"2026-06-17T16:56:18Z","modified":"2026-06-23T16:12:38Z","title":"undici vulnerable to HTTP header injection via Set-Cookie percent-decoding","vendor":"undici","product":"undici","tier":"tail","description":{"text":"Impact:\nundici'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.\n\nApplications 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.\n\nAffected applications are those that use undici's cookie parsing (parseSetCookie, parseCookie, getSetCookies) and forward the parsed cookie value into a response header.\n\nThis was introduced in undici 7.0.0 via PR #3789.\n\nPatches:\nUpgrade to undici v6.26.0, v7.28.0 or v8.5.0.\n\nWorkarounds:\nIf 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00257,"percentile":0.17721,"provenance":"source"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-p88m-4jfj-68fv","tags":[]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":[]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":3.54},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"undici","affectedVersions":[{"vendor":"undici","product":"undici","versions":["< 6.26.0",">= 7.0.0, < 7.28.0",">= 8.0.0, < 8.5.0"]}],"fixedVersions":[{"vendor":"undici","product":"undici","versions":["6.26.0","7.28.0","8.5.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-17T18:31:46.100353Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"undici","vulnerableRanges":["<6.27.0",">=7.0.0, <7.28.0",">=8.0.0, <8.5.0"],"patched":["6.27.0","7.28.0","8.5.0"],"from":["GHSA-p88m-4jfj-68fv"],"provenance":"source"}],"summary":{"text":"The undici HTTP client library's cookie parser (parseSetCookie, parseCookie, and getSetCookies) percent-decodes Set-Cookie values, turning sequences such as %0D%0A into literal CR and LF bytes that the RFC does not call for. An attacker who controls an upstream response can exploit this when an application forwards a parsed cookie value into one of its own response headers, which requires that application to use these parsing functions and copy the result downstream without sanitization; no direct network access to the victim is needed beyond the upstream response.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:13:55Z"},"euvd":{"id":"EUVD-2026-37764","exploited":false,"provenance":"source"}}