---
title: "GHSA-4www-5p9h-95mh: http-proxy-middleware can call writeBody twice because \"else if\" is not used"
description: "Moderate severity. http-proxy-middleware can call writeBody twice because \"else if\" is not used. Affects http-proxy-middleware; fixed in 3.0.4."
url: https://inlinr.com/advisories/GHSA-4www-5p9h-95mh
lang: en
---

[Packages](https://inlinr.com/packages) / [http-proxy-middleware](https://inlinr.com/packages/http-proxy-middleware) / [Security](https://inlinr.com/packages/http-proxy-middleware/security)

Moderate Vulnerability GHSA-4www-5p9h-95mh CVE-2025-32996 Published 15 Apr 2025

# http-proxy-middleware can call writeBody twice because "else if" is not used

Your version 

Affected releases · [http-proxy-middleware](https://inlinr.com/packages/http-proxy-middleware)

- 3.x 3.0.0 – 3.0.3 Fixed in 3.0.4
- 2.x 2.0.0 – 2.0.7 Fixed in 2.0.8
- 1.x 1.3.0 – 1.3.1 No fix on this line yet

On 3.x, the newest line:

```
npm install http-proxy-middleware@3.0.4
```

Every release on a timeline

4.x 

1. Not affected

4.0.0 – 4.2.2  
6 releases, latest

3.x 

1. Affected

3.0.0 – 3.0.3  
4 releases
2. Fixed

3.0.4 – 3.0.11  
6 releases

2.x 

1. Affected

2.0.0 – 2.0.7  
8 releases
2. Fixed

2.0.8 – 2.0.12  
5 releases

1.x 

1. Not affected

1.0.0 – 1.2.1  
12 releases
2. Affected

1.3.0 – 1.3.1  
2 releases

82 stable releases of http-proxy-middleware, oldest to newest, one row per major.

## What happens

In http-proxy-middleware before 2.0.8 and 3.x before 3.0.4, writeBody can be called twice because "else if" is not used.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: low

CVSS:3.1/​AV:N/​AC:H/​PR:N/​UI:N/​S:C/​C:N/​I:N/​A:L

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2025-32996 "https://nvd.nist.gov/vuln/detail/CVE-2025-32996")  
nvd.nist.gov/vuln/detail/CVE-2025-32996
- [Pull request](https://github.com/chimurai/http-proxy-middleware/pull/1089 "https://github.com/chimurai/http-proxy-middleware/pull/1089")  
#1089
- [Fix commit](https://github.com/chimurai/http-proxy-middleware/commit/020976044d113fc0bcbbaf995e91d05e2829a145 "https://github.com/chimurai/http-proxy-middleware/commit/020976044d113fc0bcbbaf995e91d05e2829a145")  
0209760
- [Package](https://github.com/chimurai/http-proxy-middleware "https://github.com/chimurai/http-proxy-middleware")  
github.com/chimurai/http-proxy-middleware
- [Reference](https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.8 "https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.8")  
github.com/chimurai/http-proxy-middleware/relea…
- [Reference](https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.4 "https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.4")  
github.com/chimurai/http-proxy-middleware/relea…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
