CVE-2023-24807 Undici vulnerable to Regular Expression Denial of Service in Headers

High 7.5 Published Updated

Attackers can cause denial of service in Node.js applications using Undici by sending crafted headers that trigger inefficient regex processing.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-24807?

CVE-2023-24807 is a high-severity denial of service vulnerability in Nodejs Undici, published on 16 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-1333, CWE-20

Which versions are affected by CVE-2023-24807?

2 open source packages ship an affected version, including undici. It affects 1 product.

PackageAffectedFixed in
undici npmAll versions5.19.1
undici npmAll versions5.19.1

Products include Nodejs Undici.

How do I fix CVE-2023-24807?

Upgrade undici to 5.19.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-24807 being exploited?

There is no known exploitation of CVE-2023-24807 in the wild and no public exploit code.

All Nodejs Undici vulnerabilities

Sources

Also known as ALPINE-CVE-2023-24807, AZL-13585, CLEANSTART-2026-DR81421, CLEANSTART-2026-NQ17832, DEBIAN-CVE-2023-24807, GHSA-r6ch-mqf9-qc9w.

Is CVE-2023-24807 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free