CVE-2026-9679
undici vulnerable to HTTP header injection via Set-Cookie percent-decoding
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.
INFO
Published Date :
June 17, 2026, 6:18 p.m.
Last Modified :
June 25, 2026, 5:43 p.m.
Remotely Exploit :
No
Source :
ce714d77-add3-4f53-aff5-83d477b104bb
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | ce714d77-add3-4f53-aff5-83d477b104bb | ||||
| CVSS 3.1 | MEDIUM | MITRE-CVE |
Solution
- Upgrade to undici v6.26.0, v7.28.0, or v8.5.0.
- Sanitize cookie values to strip CR, LF, NUL, ;, and = bytes.
- Avoid forwarding parsed cookie values directly into response headers.
Public PoC/Exploit Available at Github
CVE-2026-9679 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-9679.
| URL | Resource |
|---|---|
| https://cna.openjsf.org/security-advisories.html | Vendor Advisory |
| https://github.com/nodejs/undici/security/advisories/GHSA-p88m-4jfj-68fv | Vendor Advisory Mitigation |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-9679 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-9679
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Dockerfile
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-9679 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-9679 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Jun. 25, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:* versions from (including) 8.0.0 up to (excluding) 8.5.0 *cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:* versions up to (excluding) 6.27.0 *cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:* versions from (including) 7.0.0 up to (excluding) 7.28.0 Added Reference Type openjs: https://cna.openjsf.org/security-advisories.html Types: Vendor Advisory Added Reference Type openjs: https://github.com/nodejs/undici/security/advisories/GHSA-p88m-4jfj-68fv Types: Mitigation, Vendor Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-9679', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-17T18:31:46.100353Z'} -
New CVE Received by ce714d77-add3-4f53-aff5-83d477b104bb
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'undici', 'product': 'undici', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': '6.26.0', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.26.0', 'versionType': 'semver'}, {'status': 'affected', 'version': '7.0.0', 'lessThan': '7.28.0', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '7.28.0', 'versionType': 'semver'}, {'status': 'affected', 'version': '8.0.0', 'lessThan': '8.5.0', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '8.5.0', 'versionType': 'semver'}], 'packageURL': 'pkg:npm/undici', 'defaultStatus': 'unaffected'}] Added 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. Added CVSS V3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N Added CWE CWE-93 Added Reference https://cna.openjsf.org/security-advisories.html Added Reference https://github.com/nodejs/undici/security/advisories/GHSA-p88m-4jfj-68fv