Medium severity · published Jul 21, 2022
CVE-2022-31151
Authorization headers are cleared on cross-origin redirect
6.5
CVSS
0.7%
EPSS
No
On KEV
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).
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.7% · higher than 54% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
UN
Undici · Nodejs
before 5.7.1 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-31151
CVE.org
https://www.cve.org/CVERecord?id=CVE-2022-31151
Exploit
https://github.com/nodejs/undici/issues/872
Third Party Advisory
https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
Permissions Required
https://hackerone.com/reports/1635514
Third Party Advisory
https://security.netapp.com/advisory/ntap-20220909-0006/
More from Undici
9.8
CVE-2026-1525
undici is vulnerable to Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
9.8
CVE-2022-35949
undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forgery) when an application takes in **user input** into the…
9.1
CVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
9.1
CVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
9.1
CVE-2026-84961
undici vulnerable to TLS certificate validation bypass via dropped connect options in BalancedPool
