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

Published Jun 17, 2026
·
Updated

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

Patches

Upgrade to undici v6.27.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.

Other sources

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.

NVD

Affected Software

10 affected componentsFixes available
npm/undici<6.26.0, >=7.0.0<7.28.0, >=8.0.0<8.5.0
npm/undici>=8.0.0<8.5.0
8.5.0
npm/undici>=7.0.0<7.28.0
7.28.0
npm/undici<6.27.0
6.27.0
Nodejs Undici Node.js<6.27.0
Nodejs Undici Node.js>=7.0.0<7.28.0
Nodejs Undici Node.js>=8.0.0<8.5.0
IBM Maximo Application Suite<=9.2
IBM Maximo Application Suite<=9.1
IBM Maximo Application Suite<=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 8.5.0
  2. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 7.28.0
  3. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 6.27.0
  4. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 6.26.0
  5. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.28.0
  6. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.5.0
  7. Configuration

    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.

    undici cookie parsing Do not directly forward parsed cookie values into response headers = sanitize/strip bytes before forwarding

Event History

Jun 17, 2026
CVE Published
via MITRE·04:56 PM
Data Sourced
via MITRE·04:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:18 PM
DescriptionSeverityWeaknessAffected Software
Jun 19, 2026
Advisory Published
via GitHub·02:21 PM
Data Sourced
via GitHub·02:21 PM
DescriptionSeverityWeaknessAffected Software
Aug 3, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-9679?

CVE-2026-9679 has a medium severity rating of 5.9.

2

What is the impact of CVE-2026-9679?

CVE-2026-9679 allows for HTTP header injection through undici's cookie parser by percent-decoding certain cookie values.

3

How do I fix CVE-2026-9679?

To fix CVE-2026-9679, it is recommended to update the undici library to the latest version that addresses this vulnerability.

4

What type of injection vulnerability is found in CVE-2026-9679?

CVE-2026-9679 is classified as a CRLF injection vulnerability.

5

What specific cookie values are affected by CVE-2026-9679?

CVE-2026-9679 affects cookie values that include encoded sequences such as %0D%0A, %00, %3B, and %3D.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203