Live threats

All CVEs / Nodejs

CVE-2022-31151Nodejs Undici

Medium 6.5 No auth needed

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
Weakness (CWE)
CWE-601, CWE-346
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).

Original NVD text.

What to do

  1. Apply the vendor's security update for Undici.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
nodejsundici< 5.7.1

Official sources

References

Links published by the sources. Open them with care.