Skip to content

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

MediumCVSS 5.9 EPSS 0.26%
Published
Updated
Exploit status
No public exploit known

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.

Affected products

ProductAffected versionsFixed in
npm undici < 6.26.0 6.26.0
npm undici >= 7.0.0, < 7.28.0 7.28.0
npm undici >= 8.0.0, < 8.5.0 8.5.0
redhat/nodejs26-main(Red Hat:hummingbird:1) < 11.17.0-1.26.5.0.1.3.hum1 11.17.0-1.26.5.0.1.3.hum1
redhat/nodejs26-main(Red Hat:hummingbird:1) < 26.5.0-1.3.hum1 26.5.0-1.3.hum1
redhat/nodejs24-main(Red Hat:hummingbird:1) < 11.16.0-1.24.18.0.0.3.hum1 11.16.0-1.24.18.0.0.3.hum1
redhat/nodejs24-main(Red Hat:hummingbird:1) < 24.18.0-0.3.hum1 24.18.0-0.3.hum1
redhat/odf4/cephcsi-rhel9:1786705347(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/cephcsi-rhel9-operator:1786706101(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/mcg-core-rhel9:1786705558(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/mcg-rhel9-operator:1786705646(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/ocs-client-console-rhel9:1786706138(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/ocs-client-rhel9-operator:1786705741(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/ocs-metrics-exporter-rhel9:1786705777(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/ocs-rhel9-operator:1786705802(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-cli-rhel9:1786705938(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-console-rhel9:1786706577(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-cosi-sidecar-rhel9:1786706125(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-csi-addons-rhel9-operator:1786706177(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-csi-addons-sidecar-rhel9:1786706188(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-multicluster-console-rhel9:1786706679(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-multicluster-rhel9-operator:1786706357(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-must-gather-rhel9:1786706612(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odf-rhel9-operator:1786706644(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/odf4/odr-rhel9-operator:1786706659(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
Show 74 more
ProductAffected versionsFixed in
redhat/odf4/rook-ceph-rhel9-operator:1786706880(Red Hat:openshift_data_foundation:4.18::el9) All versions No fix listed
redhat/cryostat-openshift-console-plugin-npm(Red Hat:cryostat:4) All versions No fix listed
redhat/grafana-infinity-datasource-npm(Red Hat:cryostat:4) All versions No fix listed
redhat/undici(Red Hat:cryostat:4) All versions No fix listed
redhat/openshift-pipelines/pipelines-console-plugin-pf5-rhel9(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-console-plugin-rhel8(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-console-plugin-rhel9(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/undici(Red Hat:amq_broker:7) All versions No fix listed
redhat/rh-podman-desktop.git(Red Hat:podman_desktop:1) All versions No fix listed
redhat/rhdh/rhdh-hub-rhel9(Red Hat:rhdh:1) All versions No fix listed
redhat/nodejs22(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/nodejs24(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/nodejs(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/nodejs:22/nodejs(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/nodejs:24/nodejs(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/nodejs25(Red Hat:hummingbird:1) All versions No fix listed
redhat/rhoai/odh-dashboard-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-automl-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-autorag-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-eval-hub-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-gen-ai-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-maas-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-mlflow-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-model-registry-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/openshift4/ose-agent-installer-ui-rhel9(Red Hat:openshift:4) All versions No fix listed
redhat/openshift4/ose-console-rhel9(Red Hat:openshift:4) All versions No fix listed
redhat/openshift4/ose-monitoring-plugin-rhel9(Red Hat:openshift:4) All versions No fix listed
redhat/openshift5/ose-agent-installer-ui-rhel9(Red Hat:openshift:5) All versions No fix listed
redhat/openshift5/ose-console-rhel9(Red Hat:openshift:5) All versions No fix listed
redhat/devspaces/code-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/devspaces/dashboard-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/devspaces/openvsx-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/devspaces/pluginregistry-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/ansible-automation-platform/automation-portal(Red Hat:ansible_portal:2) All versions No fix listed
redhat/ansible-automation-platform/bootc-automation-portal-rhel9(Red Hat:ansible_portal:2) All versions No fix listed
npm undici(npm) < 6.27.0 6.27.0
npm undici(npm) >= 7.0.0, < 7.28.0 7.28.0
npm undici(npm) >= 8.0.0, < 8.5.0 8.5.0
debian/node-undici(Debian:13) All versions No fix listed
debian/node-undici(Debian:13) = 7.15.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 7.15.0+dfsg+~cs3.2.0-3 No fix listed
debian/node-undici(Debian:13) = 7.16.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 7.16.0+dfsg+~cs3.2.0-2 No fix listed
debian/node-undici(Debian:13) = 7.18.2+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 7.24.5+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 7.24.6+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 7.24.6+dfsg+~cs3.2.0-2 No fix listed
debian/node-undici(Debian:13) = 7.24.6+dfsg+~cs3.2.0-3 No fix listed
debian/node-undici(Debian:13) = 7.3.0+dfsg1+~cs24.12.11-1 No fix listed
debian/node-undici(Debian:13) = 7.3.0+dfsg1+~cs24.12.11-2 No fix listed
debian/node-undici(Debian:13) = 8.10.2+dfsg+~cs3.2.2-1 No fix listed
debian/node-undici(Debian:13) = 8.5.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:13) = 8.5.0+dfsg+~cs3.2.0-2 No fix listed
debian/node-undici(Debian:13) = 8.5.0+dfsg+~cs3.2.0-3 No fix listed
debian/node-undici(Debian:13) = 8.9.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) < 8.5.0+dfsg+~cs3.2.0-1 8.5.0+dfsg+~cs3.2.0-1
debian/node-undici(Debian:14) = 7.15.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) = 7.15.0+dfsg+~cs3.2.0-3 No fix listed
debian/node-undici(Debian:14) = 7.16.0+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) = 7.16.0+dfsg+~cs3.2.0-2 No fix listed
debian/node-undici(Debian:14) = 7.18.2+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) = 7.24.5+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) = 7.24.6+dfsg+~cs3.2.0-1 No fix listed
debian/node-undici(Debian:14) = 7.24.6+dfsg+~cs3.2.0-2 No fix listed
debian/node-undici(Debian:14) = 7.24.6+dfsg+~cs3.2.0-3 No fix listed
debian/node-undici(Debian:14) = 7.3.0+dfsg1+~cs24.12.11-1 No fix listed
debian/node-undici(Debian:14) = 7.3.0+dfsg1+~cs24.12.11-2 No fix listed
ubuntu/node-undici(Ubuntu:24.04) All versions No fix listed
ubuntu/node-undici(Ubuntu:26.04) All versions No fix listed
ubuntu/node-undici(Ubuntu:26.10) All versions No fix listed
nodejs undici < 6.27.0 6.27.0
nodejs undici >= 7.0.0, < 7.28.0 7.28.0
nodejs undici >= 8.0.0, < 8.5.0 8.5.0

References