p PatchFirst

CVE-2022-31151

CVE-2022-31151 · Uncleared cookies on cross-host/cross-origin redirect in undici

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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).

CVSS 3.7 · Low · EPSS 0.7% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • undici

    Versions
    • < 5.7.1: Affected

    No fix published

  • node-undici Debian:12

    Affected ranges
    • ECOSYSTEM: < 5.8.0+dfsg1+~cs18.9.16-1

    Update to 5.8.0+dfsg1+~cs18.9.16-1

  • node-undici Debian:13

    Affected ranges
    • ECOSYSTEM: < 5.8.0+dfsg1+~cs18.9.16-1

    Update to 5.8.0+dfsg1+~cs18.9.16-1

  • node-undici Debian:14

    Affected ranges
    • ECOSYSTEM: < 5.8.0+dfsg1+~cs18.9.16-1

    Update to 5.8.0+dfsg1+~cs18.9.16-1

  • undici npm

    Affected ranges
    • SEMVER: < 5.8.0

    Update to 5.8.0

  • node-undici Ubuntu:24.04:LTS

    Versions
    • 5.22.1+dfsg1+~cs20.10.10.2-1ubuntu1
    • 5.26.3+dfsg1+~cs23.10.12-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-undici Ubuntu:25.10

    Versions
    • 7.3.0+dfsg1+~cs24.12.11-1
    • 7.3.0+dfsg1+~cs24.12.11-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-undici Ubuntu:26.10

    Versions
    • 7.18.2+dfsg+~cs3.2.0-1build1
    • 7.24.6+dfsg+~cs3.2.0-3
    • 8.5.0+dfsg+~cs3.2.0-2
    • 8.5.0+dfsg+~cs3.2.0-3
    • 8.9.0+dfsg+~cs3.2.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-undici Ubuntu:26.04:LTS

    Versions
    • 7.3.0+dfsg1+~cs24.12.11-2
    • 7.16.0+dfsg+~cs3.2.0-2
    • 7.18.2+dfsg+~cs3.2.0-1
    • 7.18.2+dfsg+~cs3.2.0-1build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →