CVE-2022-31151
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).
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| sles | affected | | |
| debian | bookworm | fixed | 5.8.0+dfsg1+~cs18.9.16-1 |
| debian | forky | fixed | 5.8.0+dfsg1+~cs18.9.16-1 |
| debian | sid | fixed | 5.8.0+dfsg1+~cs18.9.16-1 |
| debian | trixie | fixed | 5.8.0+dfsg1+~cs18.9.16-1 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| npm | undici | <5.8.0 | 5.8.0 |
References
- https://www.suse.com/security/cve/CVE-2022-31151.html
- https://github.com/nodejs/undici/security/advisories/GHSA-q768-x9m6-m9qp
- https://nvd.nist.gov/vuln/detail/CVE-2022-31151
- https://github.com/nodejs/undici/issues/872
- https://github.com/nodejs/undici/pull/1441
- https://github.com/nodejs/undici/commit/0a5bee9465e627be36bac88edf7d9bbc9626126d
- https://hackerone.com/reports/1635514
- https://github.com/nodejs/undici
- https://github.com/nodejs/undici/blob/main/lib/handler/redirect.js#L189
- https://github.com/nodejs/undici/releases/tag/v5.8.0
- https://security.netapp.com/advisory/ntap-20220909-0006
- https://security-tracker.debian.org/tracker/CVE-2022-31151
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.