CVE-2022-31151

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

Published Jul 20, 2022 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
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).

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-6396 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).
Github GHSA Github GHSA GHSA-q768-x9m6-m9qp undici before v5.8.0 vulnerable to uncleared cookies on cross-host / cross-origin redirect
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat
Redhat acm
CPEs cpe:/a:redhat:acm:2.4::el8
Vendors & Products Redhat
Redhat acm
Type Values Removed Values Added
CPEs cpe:/a:redhat:acm:2.4::el8
Vendors & Products Redhat
Redhat acm
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 22, 2025, 5:48 PM
Reserved
May 18, 2022, 12:00 AM
Status
Modified
Published
Jul 21, 2022, 4:15 AM
Modified
Jun 17, 2026, 4:44 AM
Severity
Moderate
Public date
Jul 21, 2022, 12:00 AM