CVE-2022-31151
undici before v5.8.0 vulnerable to uncleared cookies on cross-host / cross-origin redirect
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).
How to fix CVE-2022-31151
To remediate CVE-2022-31151, upgrade the affected package to a fixed version below.
- —upgrade to 5.8.0+dfsg1+~cs18.9.16-1 or later
- —upgrade to 5.8.0 or later
Is CVE-2022-31151 being exploited?
Low — EPSS is 0.1%, meaning exploitation activity has not been observed at scale.
Affected packages (2)
- from 0, < 5.8.0+dfsg1+~cs18.9.16-1
- from 0, < 5.8.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | LOW3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |