Skip to main content
MEDIUM

CVE-2022-31151

CVSS v3

6.5

MEDIUM

EPSS Score

0.7 %

exploit probability, as of 2026-10-19

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for undici.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • undicinpmall versions · fixed in 5.8.0

Vendor advisories

  • CVE-2022-31151 Red Hat Product Security1 known affected

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

    rhacm2/search-ui-rhel8 as a component of Red Hat Advanced Cluster Management for Kubernetes 2

  • RHSA-2022:6696 Red Hat Product Security221 products fixed

    Red Hat Security Advisory: Red Hat Advanced Cluster Management 2.4.6 security update and bug fixes

Full record on NVD

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

Technical details

Published
2022-07-21

Frequently asked questions

What is CVE-2022-31151?

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

Is CVE-2022-31151 actively exploited?

Active exploitation of CVE-2022-31151 has not been confirmed. Its EPSS score was 0.7% on 2026-10-19, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-31151?

CVE-2022-31151 has a CVSS v3 base score of 6.5 (MEDIUM severity).

Running undici? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month