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

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

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Feb 2023
- **Updated:** 10 Mar 2025
- **Also known as:** ALPINE-CVE-2023-24807, AZL-13585, CLEANSTART-2026-DR81421, CLEANSTART-2026-NQ17832, DEBIAN-CVE-2023-24807, GHSA-r6ch-mqf9-qc9w

## 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 (Inefficient Regular Expression Complexity), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2023-24807?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `undici` | npm | All versions | 5.19.1 |
| `undici` | npm | All versions | 5.19.1 |

Products: Nodejs Undici.

## How do I fix CVE-2023-24807?

Upgrade undici to 5.19.1 or later.

## Is CVE-2023-24807 being exploited?

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

## Other vulnerabilities in Nodejs Undici

- [CVE-2026-109855](https://insights.sbomify.com/CVE-2026-109855/): undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake (high 7.5)
- [CVE-2026-109869](https://insights.sbomify.com/CVE-2026-109869/): undici vulnerable to Denial of Service via unhandled error on excessive content-encodings (high 7.5)
- [CVE-2026-87018](https://insights.sbomify.com/CVE-2026-87018/): undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation (high 7.5)
- [CVE-2026-19534](https://insights.sbomify.com/CVE-2026-19534/): undici vulnerable to Denial of Service via unrequested WebSocket subprotocol (high 7.5)
- [CVE-2026-12151](https://insights.sbomify.com/CVE-2026-12151/): undici WebSocket client vulnerable to denial of service via fragment count bypass (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-24807 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2023-24807 in the wild and no public exploit code.

Affected packages and fixed versions:
- undici (npm): affected all versions; fixed in 5.19.1
- undici (npm): affected all versions; fixed in 5.19.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-24807/ (Markdown: https://insights.sbomify.com/CVE-2023-24807/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-24807
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-24807
- OSV: https://osv.dev/vulnerability/CVE-2023-24807

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-24807/
Summaries are generated and may contain mistakes; the official description above is the record.
