# CVE-2024-21536: Denial of service in http-proxy-middleware

> An attacker can crash the Node.js server by sending requests to specific paths, causing a Denial of Service via an unhandled promise rejection.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Oct 2024
- **Updated:** 2 Aug 2026
- **Also known as:** CLSA-2026-1774657386, CLSA-2026-1776299658, CLSA-2026-1784164086, CLSA-2026-1784164093, CLSA-2026-1784596275, GHSA-c7qv-q95q-8v27, ROOT-APP-NPM-CVE-2024-21536

## What is CVE-2024-21536?

CVE-2024-21536 is a high-severity denial of service vulnerability in http-proxy-middleware, published on 19 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Versions of the package http-proxy-middleware before 2.0.7, from 3.0.0 and before 3.0.3 are vulnerable to Denial of Service (DoS) due to an UnhandledPromiseRejection error thrown by micromatch. An attacker could kill the Node.js process and crash the server by making requests to certain paths.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2024-21536?

4 open source packages ship an affected version, including http-proxy-middleware. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `http-proxy-middleware` | npm | All versions | 2.0.7 |
| `http-proxy-middleware` | npm | All versions | 2.0.7 |
| `http-proxy-middleware` | npm | From 3.0.0 | 3.0.3 |
| `http-proxy-middleware` | npm | From 3.0.0 | 3.0.3 |

Products: Chimurai Http-Proxy-Middleware.

## How do I fix CVE-2024-21536?

Upgrade http-proxy-middleware to a fixed version for your release line: 2.0.7 or 3.0.3.

## Is CVE-2024-21536 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21536 exists.

## Other vulnerabilities in http-proxy-middleware

- [CVE-2026-55603](https://insights.sbomify.com/CVE-2026-55603/): http-proxy-middleware: multipart/form-data field injection via unescaped CRLF in `fixRequestBody` (high 7.5)
- [CVE-2026-55602](https://insights.sbomify.com/CVE-2026-55602/): http-proxy-middleware `router` host+path substring matching allows Host-header-driven backend routing bypass (medium 6.9)
- [CVE-2025-32996](https://insights.sbomify.com/CVE-2025-32996/): http-proxy-middleware can call writeBody twice because "else if" is not used (medium 4.0)
- [CVE-2025-32997](https://insights.sbomify.com/CVE-2025-32997/): http-proxy-middleware allows fixRequestBody to proceed even if bodyParser has failed (medium 4.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-21536 and fix it if it is affected.

What it is: CVE-2024-21536 is a high-severity denial of service vulnerability in http-proxy-middleware, published on 19 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21536 exists.

Affected packages and fixed versions:
- http-proxy-middleware (npm): affected all versions; fixed in 2.0.7
- http-proxy-middleware (npm): affected all versions; fixed in 2.0.7
- http-proxy-middleware (npm): affected from 3.0.0; fixed in 3.0.3
- http-proxy-middleware (npm): affected from 3.0.0; fixed in 3.0.3

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-2024-21536/ (Markdown: https://insights.sbomify.com/CVE-2024-21536/index.md)
```

## Sources

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

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