HIGH 7.5

CVE-2026-55603: http-proxy-middleware Multipart CR/LF Injection Vulnerability

http-proxy-middleware is a popular Node.js library that relays HTTP requests through a proxy. The library includes a helper function called fixRequestBody() designed to re-send request bodies that were already read by middleware. When handling multipart form data (file uploads and form submissions), the library reconstructs the request body by inserting form field values directly into the wire format without escaping carriage return and line feed characters (\r\n). An attacker can exploit this by crafting a form submission where a field value contains these special characters, allowing them to inject additional form fields that the backend server will interpret as separate parameters. This creates a dangerous mismatch: the proxy's body parser validates the original fields, but the upstream server receives and processes injected fields, enabling request smuggling and parameter injection attacks.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N
Weaknesses (CWE)
CWE-93
Affected products
1 configuration(s)
Published / Modified
2026-06-22 / 2026-06-24

NVD description (verbatim)

http-proxy-middleware is node.js http-proxy middleware. From 3.0.4 until 3.0.7 and 4.1.1, 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. 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. This vulnerability is fixed in 3.0.7 and 4.1.1.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in the handlerFormDataBodyData() function, which is called by fixRequestBody() to reconstruct multipart/form-data bodies. The function directly interpolates form field keys and values from req.body into the multipart wire format without sanitizing or encoding CR/LF characters (\x0d\x0a). Because multipart boundaries are delimited by CRLF sequences, an attacker-controlled value containing \r\n can prematurely terminate the current part boundary and inject malformed or entirely new parts that follow. This results in a request/parameter desynchronization vulnerability (CWE-93): the gateway-side policy engine evaluates the req.body object before proxy reconstruction, while the upstream backend parses the reconstructed wire format and encounters injected fields. The affected versions are 3.0.4 through 3.0.7 and 4.1.1; the fix is available in 3.0.7 and 4.1.1 or later.

Business impact

Organizations using http-proxy-middleware in API gateways, reverse proxies, or request routing pipelines face two critical risks. First, security controls that validate or filter req.body fields (rate limiting, input validation, access control policies) are bypassed because they evaluate the legitimate form fields while the backend receives injected parameters. Second, attackers can inject fields that execute unintended actions—such as privilege escalation, unauthorized data access, or business logic manipulation—if the upstream service trusts proxy-provided parameters. In multi-tenant environments or when the proxy sits between untrusted clients and sensitive backend services, this can lead to cross-customer data leakage or unauthorized actions performed as legitimate users.

Affected systems

The vulnerability affects chimurai's http-proxy-middleware versions 3.0.4 through 3.0.7 (inclusive) and version 4.1.1. Any Node.js application that uses fixRequestBody() to handle multipart/form-data requests is at risk. This includes API gateways, reverse proxies, microservice routers, and authentication/authorization proxies that rewrite or re-emit request bodies. Applications that do not use fixRequestBody(), or that do not proxy multipart/form-data requests, are not affected. Check your package-lock.json or package.json to determine if a vulnerable version is in use.

Exploitability

The CVSS 3.1 score of 7.5 (HIGH) reflects moderate attack complexity but high impact. Exploitation requires network access and crafted multipart form submissions but no authentication or user interaction. The attacker must know or guess valid form field names expected by the backend to inject additional parameters effectively. Attack complexity is rated as high because the attacker must understand the downstream service's form schema and parameters; however, this information is often publicly documented or discoverable. Once an attacker understands the target service, exploitation is straightforward: inject CR/LF characters into form field values and observe whether injected fields are processed by the backend.

Remediation

Upgrade http-proxy-middleware to version 3.0.7 or later (for the 3.x line) or version 4.1.1 or later (for the 4.x line). These versions properly escape CR/LF characters in multipart form field values, preventing boundary injection. Test the upgrade in a staging environment to ensure no breaking changes affect your request routing. If you cannot upgrade immediately, consider disabling fixRequestBody() and instead letting the original request flow through, or implement manual CR/LF sanitization before reconstructing multipart bodies. For highest security, validate and canonicalize form field names and values at the proxy layer before they reach downstream services.

Patch guidance

Verify the fixed versions against the vendor advisory for http-proxy-middleware. The patches were released to address CR/LF sanitization in multipart/form-data reconstruction. When patching, test proxy behavior with legitimate multipart requests (file uploads, standard form submissions) to ensure the sanitization does not corrupt valid payloads. If your application builds custom body reconstruction logic on top of or alongside fixRequestBody(), review that code for similar CR/LF handling issues. Automated dependency scanning tools should be configured to flag versions 3.0.4–3.0.7 and 4.1.1 as vulnerable.

Detection guidance

Monitor proxy logs and upstream access logs for multipart requests with suspicious field names or values containing encoded or literal CR/LF sequences (\r, \n, %0d, %0a). Watch for form field counts or field names in proxy logs that differ from those in backend logs—a sign that field injection succeeded. Implement request body inspection at the proxy layer to detect and reject multipart parts with boundary-delimiter characters in field values. If feasible, correlate the form fields validated by your proxy middleware against the fields actually processed by the backend; significant divergence suggests successful exploitation. Web application firewalls should inspect multipart bodies for CR/LF injection patterns.

Why prioritize this

This vulnerability ranks as HIGH priority because it enables request/parameter desynchronization attacks that bypass gateway-level validation and access control policies. Unlike many proxy vulnerabilities that require specific configurations, fixRequestBody() with multipart data is a documented and commonly-used feature. The attack surface is large: any public-facing proxy handling form submissions or file uploads is potentially vulnerable. Patch deployment should be expedited for internet-facing services and those handling sensitive data or authentication.

Risk score, explained

The CVSS 3.1 score of 7.5 reflects a network-accessible vulnerability with high integrity impact (parameter injection leading to unintended actions) and low confidentiality impact (information disclosure via field injection). Attack complexity is high because successful exploitation requires understanding the downstream service's expected parameters. Scope is changed because the impact extends beyond the proxy itself to the upstream service. The absence of a known exploit in the wild (KEV status is false) slightly reduces near-term urgency but should not delay patching, as the vulnerability is straightforward to weaponize.

Frequently asked questions

Does this vulnerability affect applications that use http-proxy-middleware but do not call fixRequestBody()?

No. The vulnerability is specific to the fixRequestBody() helper function, which is optional. Applications that proxy requests without re-emitting or reconstructing bodies are unaffected. Check your code for direct calls to fixRequestBody() or whether it is invoked indirectly through middleware configuration.

Can I work around this vulnerability without upgrading?

Partial mitigation is possible: disable fixRequestBody() and allow the original request to flow through without body reconstruction, or implement strict CR/LF filtering on all form field values before reconstruction. However, these workarounds may break legitimate functionality. The safest approach is to upgrade to a patched version.

What is the difference between the 3.0.7 and 4.1.1 patches?

Both versions fix the CR/LF sanitization issue in multipart body reconstruction. The version numbers reflect different release lines of the library. Choose the patch version aligned with your current major version (3.x or 4.x) to minimize compatibility risk. Verify specific patch details in the vendor's release notes.

How would an attacker discover which form fields are accepted by the upstream backend?

Attackers often use common parameter names (user_id, role, admin, is_premium) or discover them through reconnaissance—examining JavaScript bundles, API documentation, or error messages. In some cases, they may brute-force known field names. Proper API design and input validation at the backend layer remain essential defenses.

This analysis is based on published vulnerability data current as of the source document date. Patch version numbers and affected version ranges are derived from the vendor advisory; verify these against official chimurai/http-proxy-middleware release notes before deployment. No proof-of-concept or exploit code is provided. Organizations should test patches in staging environments and assess their own architecture and risk tolerance. SEC.co and this analysis do not constitute professional security advice tailored to your specific environment. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).