Skip to content
Fencer Vulns
low 3.7

CVE-2022-31151 json

Uncleared cookies on cross-host/cross-origin redirect in undici

published 2022-07-20 4 y ago modified 2026-06-17 4 mo ago also GHSA-q768-x9m6-m9qp , EUVD-2022-6396

cvss
3.7
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 54%
public exploits
0
none known

Summary

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).

Patch / fix

  • npm undici 5.8.0
  • nodejs undici 5.7.1
  • node-undici Debian 14, Debian 13, Debian 12 5.8.0+dfsg1+~cs18.9.16-1

debian advisories DEBIAN-CVE-2022-31151

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-31151 updated cvss 3.7

nodejs/undici: Cookie headers uncleared on cross-origin redirect

  • Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/search-ui-rhel8
    affected: workaround, no fix available “By default, this vulnerability is not exploitable. In order to make sure this is mitigated, do not enable redirections, i.e.: `maxRedirections: 0`”
  • Red Hat OpenShift Dev Spaces devspaces/dashboard-rhel8
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

0.74% chance of exploitation in the next 30 days, higher than 54% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/nodejs/undici/issues/872 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 3.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
GitHub 3.1 3.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected packages

ecosystem package affected fixed in
npm undici
<5.8.0
5.8.0

Affected products

  • nodejs undici

Classification

Weakness
  • CWE-601 URL Redirection to Untrusted Site
  • CWE-346 Origin Validation Error
  • CWE-93 Improper Neutralization of CRLF Sequences

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.