Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify proxy with mixed inbound parser and multipart outbound
-
DeliveryCraft urlencoded body with CRLF-embedded forged multipart part
-
ExploitSubmit POST to gateway endpoint
-
InstallfixRequestBody rebuilds multipart body with injected part
-
C2Gateway policy validates original req.body only
-
ExecuteBackend parses smuggled role/ID/file field
-
ImpactPrivilege escalation or parameter tampering on upstream service
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Three concrete preconditions must all hold (this is the basis for AC:H): first, the proxy application must populate req.body using a non-multipart parser - express.json, express.urlencoded, or a text parser - so the attacker's embedded boundary survives intact through inbound parsing; second, the outgoing proxied request must be sent with Content-Type multipart/form-data, which routes execution into the vulnerable handlerFormDataBodyData branch (pure pass-through or JSON-out flows are unaffected); third, the integrator must explicitly call the fixRequestBody helper and the attacker must control at least one body field key or value. Limiting factors: pure multipart-in/multipart-out pipelines using multer are generally not exploitable for new-field injection because the inbound parser already splits on the attacker's boundary; deployments that never call fixRequestBody are not affected; and the practical impact depends on the backend trusting fields the gateway is supposed to police. No user interaction or authentication is required against the proxy itself (PR:N/UI:N) once a qualifying deployment exists. |
| Impact | Vendor-issued CVSS 3.1 base score is 7.5 (High) with vector AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N - the network-reachable, unauthenticated attack and scope-changed high integrity impact justify a serious rating, but AC:H reflects three stacked deployment preconditions that meaningfully narrow real-world exposure. EPSS data was not provided in the input. The vulnerability is not on CISA KEV and no in-the-wild exploitation has been reported, though publicly available exploit code exists in the GHSA advisory itself. Treat this as a real priority for any deployment that combines a non-multipart inbound parser with a multipart outbound transformation (notably adaptation/gateway proxies, file-upload bridges, and SSO-style intermediaries), but it is not an emergency for typical multipart-in/multipart-out flows handled by multer or for JSON-only proxies. The CWE-93 / CRLF classification and Authentication-Bypass tag are consistent with the described impact of slipping role/permission fields past gateway policy. |
| Exploit ScenarioDerived | An external attacker submits a normal application/x-www-form-urlencoded POST to a gateway proxy that body-parses with express.urlencoded and then forwards the request to an internal service as multipart/form-data via fixRequestBody. One field's value carries a percent-encoded CRLF plus a forged boundary and Content-Disposition for a role=admin part; the gateway's policy engine inspects req.body, sees only user=alice, and allows the request, but the backend's multipart parser splits the rebuilt body into two parts and grants admin privileges. The advisory ships a working proof-of-concept, so weaponization barrier is essentially zero once a vulnerable proxy is identified. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 18, 2026
Multipart form-data field injection in the npm package http-proxy-middleware (versions 3.0.4-3.0.6 and 4.0.0-4.1.0) lets remote attackers smuggle additional form parts past gateway-side validation by embedding CRLF sequences in body values, causing the proxy and backend to parse different field sets. The flaw lives in fixRequestBody's handlerFormDataBodyData helper, which concatenates user-controlled keys and values directly into the multipart wire format without neutralizing \r\n. Publicly available exploit code exists in the GHSA advisory, but no public exploit identified as actively used in the wild and no CISA KEV listing.
RemediationAI
Vendor-released patch: upgrade to http-proxy-middleware 3.0.7 (3.x branch) or 4.1.1 (4.x branch) per advisory GHSA-gcq2-9pq2-cxqm. If immediate upgrade is not possible, apply the upstream fix locally by patching handlerFormDataBodyData to reject (or refuse to interpolate) any key or value containing \r or \n before string-concatenation; alternatively, rewrite the helper to construct the body with a real multipart encoder such as the form-data package or native FormData, which encode field names and values safely. As targeted compensating controls: (a) avoid the dangerous shape by feeding multipart-out proxies a multipart parser like multer on the inbound side so the boundary in a malicious value is split on input - side effect: requires reworking inbound parser middleware and may break JSON/urlencoded routes; (b) stop calling fixRequestBody on routes whose outbound Content-Type is multipart/form-data and rely on streaming pass-through - side effect: loses the ability to mutate body fields server-side; (c) at the gateway/WAF, reject inbound request bodies whose decoded values contain CRLF sequences or substrings matching the proxy's multipart boundary - side effect: may block legitimate text fields with embedded newlines.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
http-proxy-middleware is a widely deployed Node.js/Express reverse-proxy library (chimurai/http-proxy-middleware) used to forward HTTP requests to upstream services. The vulnerable code path is dist/handlers/fix-request-body.js, invoked when an integrator calls fixRequestBody after a body parser (express.json, express.urlencoded, text) has already consumed the inbound stream and the outgoing Content-Type is multipart/form-data. The function reconstructs the multipart body by string-interpolating each req.body key and value between boundaries, with no escaping of CR/LF or quote characters. This is a textbook CWE-93 CRLF injection: the attacker-supplied value contains '\r\n--<boundary>\r\nContent-Disposition: form-data; name="role"\r\n\r\nadmin', which terminates the current part and forges a new one. The sibling JSON branch (JSON.stringify) and urlencoded branch (querystring.stringify) sanitize control characters; only the multipart branch is affected. The defect represents a request/parameter desynchronization across the proxy→backend trust boundary, conceptually similar to HTTP request smuggling but at the form-field layer.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N
Network-reachable and unauthenticated against the proxy (AV:N/PR:N/UI:N); three stacked deployment preconditions justify AC:H; impact crosses proxy→backend trust boundary (S:C) with high integrity (field injection) and limited confidentiality.
Primary rating from Vendor (https://github.com/chimurai/http-proxy-middleware).
CVSS VectorVendor: https://github.com/chimurai/http-proxy-middleware
DescriptionCVE.org
Summary
fixRequestBody() is the library's documented helper for re-emitting a request body that was already consumed by a body parser. When the outgoing Content-Type is multipart/form-data, it rebuilds the body with handlerFormDataBodyData(), which interpolates each req.body key and value directly into the multipart wire format without neutralizing CR/LF:
// dist/handlers/fix-request-body.js
function handlerFormDataBodyData(contentType, data) {
const boundary = contentType.replace(/^.*boundary=(.*)$/, '$1');
let str = '';
for (const [key, value] of Object.entries(data)) {
str += `--${boundary}\r\nContent-Disposition: form-data; name="${key}"\r\n\r\n${value}\r\n`;
}
}A \r\n inside a value (or key) lets an attacker close the current part and inject an entirely new form part. Because the proxy's own body parser saw a single opaque value, any gateway-side policy or validation performed on req.body is evaluated against a different set of fields than the upstream backend ultimately parses a request/parameter desynchronization across the trust boundary.
By contrast, the sibling output branches are safe: application/json uses JSON.stringify (escapes control chars) and application/x-www-form-urlencoded uses querystring.stringify (percent-encodes). Only the multipart branch lacks escaping.
Preconditions
All three must hold; this narrows real-world exposure and is the basis for AC:H:
- The proxy app populates
req.bodywith a non-multipart parser (express.urlencoded,express.json, or text) so an injected boundary in a value is not split on input. - The proxied (outgoing) request is sent as
multipart/form-data(e.g. an adaptation layer, or any flow that sets the upstream content-type to multipart), so the vulnerable branch runs. - The app calls
fixRequestBody(the documented pattern for "I body-parsed, now re-stream"), and an attacker controls at least one body field value or key.
> Note: a pure multipart-in → multipart-out flow (e.g. multer) is generally not exploitable for a *new-field* injection, because the proxy's multipart parser already splits the injected boundary, so req.body and the backend agree. The desync specifically requires a non-multipart input parser.
Impact
When the preconditions hold, an attacker injects/overrides multipart fields seen only by the backend:
- Validation / access-control bypass bypass gateway-side field checks (demonstrated below: a gateway that forbids
role=adminis bypassed; backend grants admin). - Parameter tampering add or overwrite fields the backend trusts (IDs, flags, prices).
- File-part injection inject a
filename="..."part into the upstream multipart stream.
Proof of Concept
// npm i http-proxy-middleware@4.0.0 (Node ESM: save as minimal.mjs)
import { fixRequestBody } from 'http-proxy-middleware';
// `req.body` as a NON-multipart parser (express.urlencoded / express.json) yields it.
// The attacker sent user=alice%0D%0A--BB%0D%0A... so this ONE field's value holds CRLF:
const req = { readableLength: 0, body: {
user: 'alice\r\n--BB\r\nContent-Disposition: form-data; name="role"\r\n\r\nadmin\r\n--BB--'
}};
// Minimal stand-in for the outgoing proxy request; capture what gets written.
const out = [];
const proxyReq = {
h: { 'content-type': 'multipart/form-data; boundary=BB' },
getHeader(n){ return this.h[n.toLowerCase()]; },
setHeader(n,v){ this.h[n.toLowerCase()] = v; },
write(d){ out.push(Buffer.from(d)); },
};
fixRequestBody(proxyReq, req); // library rebuilds the multipart body
console.log(Buffer.concat(out).toString());Output: one input field becomes two parts; role=admin was injected via the unescaped CRLF:
--BB
Content-Disposition: form-data; name="user"
alice
--BB
Content-Disposition: form-data; name="role" <-- injected part; never present in req.body's keys
admin
--BB--req.body had a single key (user), so any gateway policy checking req.body.role passes, yet the backend's multipart parser receives role=admin. On the wire the attacker simply sends, as application/x-www-form-urlencoded: user=alice%0D%0A--BB%0D%0AContent-Disposition:%20form-data;%20name="role"%0D%0A%0D%0Aadmin%0D%0A--BB--
Remediation
Neutralize CR/LF (and ") in keys/values before interpolation, or build the body with a real multipart encoder (e.g. FormData / form-data) instead of string concatenation. Minimal fix:
function handlerFormDataBodyData(contentType, data) {
const boundary = contentType.replace(/^.*boundary=(.*)$/, '$1');
const bad = /[\r\n]/;
let str = '';
for (const [key, value] of Object.entries(data)) {
const v = String(value);
if (bad.test(key) || bad.test(v)) {
throw new Error('fixRequestBody: CR/LF not allowed in multipart field name/value');
}
str += `--${boundary}\r\nContent-Disposition: form-data; name="${key.replace(/"/g, '%22')}"\r\n\r\n${v}\r\n`;
}
}(Reject is preferable to silent stripping, to avoid masking malicious input.)
Executive ViewAI
Organizations using http-proxy-middleware versions 3.0.4-3.0.6 and 4.0.0-4.1.0 face a critical gateway security bypass that allows injection of unauthorized form data into backend systems. This form-data injection vulnerability circumvents proxy-level validation controls, creating risk of unauthorized API access, data manipulation, and potential authentication evasion across affected applications.
Deploy Web Application Firewall rules to detect and block CRLF sequences (\r\n) in multipart form-data; implement strict input validation to reject or sanitize form field values containing carriage returns or line feeds; configure reverse proxy to normalize and validate multipart request structure; segment network access to limit backend API exposure; enable comprehensive request logging and monitoring to detect exploitation attempts.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-38349
GHSA-gcq2-9pq2-cxqm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB