Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. http-proxy-middleware
  4. ›
  5. CVE-2026-55603

CVE-2026-55603: http-proxy-middleware: multipart/form-data field injection via unescaped CRLF in `fixRequestBody`

June 18, 2026

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.

References

  • github.com/advisories/GHSA-gcq2-9pq2-cxqm
  • github.com/chimurai/http-proxy-middleware/security/advisories/GHSA-gcq2-9pq2-cxqm
  • nvd.nist.gov/vuln/detail/CVE-2026-55603

Code Behaviors & Features

Detect and mitigate CVE-2026-55603 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.4 before 3.0.7, all versions starting from 4.0.0 before 4.1.1

Fixed versions

  • 3.0.7
  • 4.1.1

Solution

Upgrade to versions 3.0.7, 4.1.1 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')

Source file

npm/http-proxy-middleware/CVE-2026-55603.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:20 +0000.