CVE-2023-24807
JSON

7.5high

Undici vulnerable to Regular Expression Denial of Service in Headers

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.34% (higher than 72% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-r6ch-mqf9-qc9w

Description

Undici is an HTTP/1.1 client for Node.js. Prior to version 5.19.1, the `Headers.set()` and `Headers.append()` methods are vulnerable to Regular Expression Denial of Service (ReDoS) attacks when untrusted values are passed into the functions. This is due to the inefficient regular expression used to normalize the values in the `headerValueNormalize()` utility function. This vulnerability was patched in v5.19.1. No known workarounds are available.

Affected

Product or packageVersionsReported by
nodejs undici< 5.19.1, before 5.19.1CVE List, NVD
undici (npm)before 5.19.1GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-20CWE-1333

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Undici is an HTTP/1.1 client for Node.js. Prior to version 5.19.1, the `Headers.set()` and `Headers.append()` methods are vulnerable to Regular Expression Denial of Service (ReDoS) attacks when untrusted values are passed into the functions. This is due to the inefficient regular expression used to normalize the values in the `headerValueNormalize()` utility function. This vulnerability was patched in v5.19.1. No known workarounds are available.

GitHub Advisory Database
Impact

The Headers.set() and Headers.append() methods are vulnerable to Regular Expression Denial of Service (ReDoS) attacks when untrusted values are passed into the functions. This is due to the inefficient regular expression used to normalize the values in the headerValueNormalize() utility function.

Patches

This vulnerability was patched in v5.19.1.

Workarounds

There is no workaround. Please update to an unaffected version.

References
Credits

Carter Snook reported this vulnerability.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-24807 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-r6ch-mqf9-qc9w changed 2026-09-10CC-BY-4.0
NVDCVE-2023-24807 changed 2026-06-17Public domain