CVE-2026-9679
Received Received - Intake
BaseFortify

Publication date: 2026-06-17

Last updated on: 2026-06-17

Assigner: 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-17
Last Modified
2026-06-17
Generated
2026-06-17
AI Q&A
2026-06-17
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
nodejs undici 6.26.0
nodejs undici From 7.0.0 (inc) to 7.28.0 (exc)
nodejs undici From 8.0.0 (inc) to 8.5.0 (exc)
nodejs undici 7.28.0
nodejs undici 8.5.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-93 The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Compliance Impact

This vulnerability enables HTTP response header injection, allowing attackers to inject malicious headers such as Set-Cookie, Location, or Cache-Control. Such attacks can lead to session fixation, open redirects, or cache poisoning, which may compromise data integrity and user session security.

While the provided information does not explicitly mention compliance with standards like GDPR or HIPAA, the ability to manipulate HTTP headers and potentially hijack sessions or redirect users could lead to violations of data protection and privacy requirements mandated by these regulations.

Therefore, organizations using affected versions of undici without proper mitigation may face increased risk of non-compliance due to potential unauthorized access or data manipulation.

Executive Summary

The vulnerability exists in undici's cookie parser functions (parseSetCookie, parseCookie, getSetCookies), which percent-decode cookie values including sequences like %0D%0A, %00, %3B, and %3D into their literal byte equivalents. This behavior is not compliant with RFC 6265 Β§5.4, which does not specify such decoding, and browsers do not perform this decoding either.

Because of this decoding, applications that parse a Set-Cookie header and then forward the parsed value into response headers (such as proxies, middleware, or server-side rendering frameworks) become vulnerable to HTTP response header injection. An attacker controlling upstream input can inject arbitrary headers like Set-Cookie, Location, or Cache-Control into downstream responses.

This vulnerability was introduced in undici version 7.0.0 and can lead to attacks such as session fixation, open redirect, or cache poisoning.

Impact Analysis

If your application uses undici's cookie parsing functions and forwards the parsed cookie values directly into response headers without sanitization, an attacker could exploit this vulnerability to inject malicious HTTP headers.

  • Session fixation: attackers can manipulate session cookies to hijack user sessions.
  • Open redirect: attackers can inject Location headers to redirect users to malicious sites.
  • Cache poisoning: attackers can inject Cache-Control headers to manipulate caching behavior, potentially serving malicious content.
Detection Guidance

This vulnerability arises when applications using undici's cookie parsing functions (parseSetCookie, parseCookie, getSetCookies) forward decoded cookie values directly into response headers, allowing HTTP response header injection.

To detect this vulnerability on your system or network, you should check if your application uses vulnerable versions of undici (versions prior to 6.26.0, between 7.0.0 and 7.28.0, or between 8.0.0 and 8.5.0) and if it forwards parsed cookie values directly into response headers without sanitization.

There are no specific commands provided in the available information to detect this vulnerability directly.

Mitigation Strategies

The primary mitigation is to upgrade undici to a fixed version: v6.26.0, v7.28.0, or v8.5.0.

If upgrading immediately is not possible, do not forward values returned by parseSetCookie, parseCookie, or getSetCookies directly into response headers.

Instead, sanitize these values first to strip or reject carriage return (CR), line feed (LF), null (NUL), semicolon (;), and equals (=) bytes to prevent HTTP response header injection.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-9679. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart