Skip to content

CVE-2022-31151 Uncleared cookies on cross-host/cross-origin redirect in undici

MediumCVSS 6.5 EPSS 0.74%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebian

Description

Authorization headers are cleared on cross-origin redirect. However, cookie headers which are sensitive headers and are official headers found in the spec, remain uncleared. There are active users using cookie headers in undici. This may lead to accidental leakage of cookie to a 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site. This was patched in v5.7.1. By default, this vulnerability is not exploitable. Do not enable redirections, i.e. maxRedirections: 0 (the default).

Upgrade path

9 packages: 5 fixed, 4 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/node-undici(Ubuntu 24.04) = 5.22.1+dfsg1+~cs20.10.10.2-1ubuntu1; = 5.26.3+dfsg1+~cs23.10.12-2; All versions No fix listed No fix yet
ubuntu/node-undici(Ubuntu 25.10) = 7.3.0+dfsg1+~cs24.12.11-1; = 7.3.0+dfsg1+~cs24.12.11-2; All versions No fix listed No fix yet
ubuntu/node-undici(Ubuntu 26.04) = 7.3.0+dfsg1+~cs24.12.11-2; = 7.16.0+dfsg+~cs3.2.0-2; = 7.18.2+dfsg+~cs3.2.0-1; = 7.18.2+dfsg+~cs3.2.0-1build1 +1 more No fix listed No fix yet
ubuntu/node-undici(Ubuntu 26.10) = 7.18.2+dfsg+~cs3.2.0-1build1; = 7.24.6+dfsg+~cs3.2.0-3; = 8.5.0+dfsg+~cs3.2.0-2; = 8.5.0+dfsg+~cs3.2.0-3 +2 more No fix listed No fix yet
debian/node-undici(Debian 12) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1 Fixed
debian/node-undici(Debian 13) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1 Fixed
debian/node-undici(Debian 14) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1 Fixed
nodejs undici < 5.7.1; = < 5.7.1 5.7.1 Fixed
npm undici(npm) < 5.8.0 5.8.0 Fixed

Affected products

ProductAffected versionsFixed in
npm undici(npm) < 5.8.0 5.8.0
nodejs undici = < 5.7.1 No fix listed
nodejs undici < 5.7.1 5.7.1
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
debian/node-undici(Debian:12) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1
debian/node-undici(Debian:14) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1
debian/node-undici(Debian:13) < 5.8.0+dfsg1+~cs18.9.16-1 5.8.0+dfsg1+~cs18.9.16-1
ubuntu/node-undici(Ubuntu:24.04) = 5.22.1+dfsg1+~cs20.10.10.2-1ubuntu1 No fix listed
ubuntu/node-undici(Ubuntu:24.04) = 5.26.3+dfsg1+~cs23.10.12-2 No fix listed
ubuntu/node-undici(Ubuntu:25.10) All versions No fix listed
ubuntu/node-undici(Ubuntu:25.10) = 7.3.0+dfsg1+~cs24.12.11-1 No fix listed
ubuntu/node-undici(Ubuntu:25.10) = 7.3.0+dfsg1+~cs24.12.11-2 No fix listed
ubuntu/node-undici(Ubuntu:26.10) = 7.18.2+dfsg+~cs3.2.0-1build1 No fix listed
ubuntu/node-undici(Ubuntu:26.10) = 7.24.6+dfsg+~cs3.2.0-3 No fix listed
ubuntu/node-undici(Ubuntu:26.10) = 8.5.0+dfsg+~cs3.2.0-2 No fix listed
ubuntu/node-undici(Ubuntu:26.10) = 8.5.0+dfsg+~cs3.2.0-3 No fix listed
ubuntu/node-undici(Ubuntu:26.10) = 8.9.0+dfsg+~cs3.2.0-1 No fix listed
ubuntu/node-undici(Ubuntu:26.04) = 7.3.0+dfsg1+~cs24.12.11-2 No fix listed
ubuntu/node-undici(Ubuntu:26.04) = 7.16.0+dfsg+~cs3.2.0-2 No fix listed
ubuntu/node-undici(Ubuntu:26.04) = 7.18.2+dfsg+~cs3.2.0-1 No fix listed
ubuntu/node-undici(Ubuntu:26.04) = 7.18.2+dfsg+~cs3.2.0-1build1 No fix listed

References