CVE-2022-31151Nodejs Undici
Medium 6.5 No auth needed
Follow: this CVE · Nodejs · Nodejs Undici We alert you by email or Slack (account required).
- Priority
- 54
- CVSS 3.1
- 6.5
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 51
- Auth required
- No
- Published
- Jul 21, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
What happens
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).
What to do
- Apply the vendor's security update for Undici.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | undici |
< 5.8.0 |
5.8.0 |
npm install undici@5.8.0 |
Per OSV / GitHub Advisories (GHSA-q768-x9m6-m9qp). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| nodejs | undici | < 5.7.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Third Party Advisory
- hackerone.com Permissions Required Third Party Advisory
- security.netapp.com Third Party Advisory