CVE-2025-32996: Http proxy middleware Http-proxy-middleware Can Call WriteBody Twice Vulnerability
MODERATECVE-2025-32996 is a MODERATE (CVSS 4.0) http-proxy-middleware can call writebody twice vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting Http proxy middleware libraries in the npm ecosystem. The issue involves http-proxy-middleware can call writebody twice because "else if" is not used. Remediation is available by upgrading affected packages to version 2.0.8, 3.0.4.
CVE-2025-32996 at a Glance
Security Impact
CVSS: 4.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L).
How to Fix CVE-2025-32996
To remediate this vulnerability, upgrade all affected Http proxy middleware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install http-proxy-middleware@2.0.8
npm install http-proxy-middleware@3.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls http-proxy-middleware
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-32996, inspect your project dependencies using npm:
npm ls http-proxy-middleware
Analyze the terminal output to locate any version of Http proxy middleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.8), your application is affected.
Note: The npm ls http-proxy-middleware command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. In Http proxy middleware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-32996 Affected Http proxy middleware Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
http-proxy-middleware
|
npm |
≥ 1.3.0
< 2.0.8
|
2.0.8
|
|
http-proxy-middleware
|
npm |
≥ 3.0.0
< 3.0.4
|
3.0.4
|
References
Frequently Asked Questions
What is CVE-2025-32996?
Which Http proxy middleware versions are affected?
What version fixes CVE-2025-32996?
Is http-proxy-middleware affected?
What is the CVSS score of CVE-2025-32996?
What CWE is associated with CVE-2025-32996?
How can I check npm dependencies for CVE-2025-32996?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4www-5p9h-95mh",
"modified" : "2025-04-28T14:27:14Z",
"published" : "2025-04-15T03:30:34Z",
"aliases" : [ "CVE-2025-32996" ],
"summary" : "http-proxy-middleware can call writeBody twice because \"else if\" is not used",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "http-proxy-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3.0"
}, {
"fixed" : "2.0.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "http-proxy-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-32996"
}, {
"type" : "WEB",
"url" : "https://github.com/chimurai/http-proxy-middleware/pull/1089"
}, {
"type" : "WEB",
"url" : "https://github.com/chimurai/http-proxy-middleware/commit/020976044d113fc0bcbbaf995e91d05e2829a145"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chimurai/http-proxy-middleware"
}, {
"type" : "WEB",
"url" : "https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.8"
}, {
"type" : "WEB",
"url" : "https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-670" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-16T15:23:58Z",
"nvd_published_at" : "2025-04-15T03:15:18Z"
}
}