Executive brief
A vulnerability in a popular Node.js web proxy tool allows attackers to bypass security filters and manipulate data sent to backend servers. By including special hidden characters in a web request, an attacker can trick the proxy into adding unauthorized fields, such as changing a user's role to 'admin' or altering prices. This can lead to unauthorized access or data tampering even if the proxy has security rules in place to prevent such actions.
Technical details
A CRLF injection vulnerability exists in the `fixRequestBody()` helper of http-proxy-middleware. When the outgoing request is set to `multipart/form-data`, the `handlerFormDataBodyData()` function performs direct string interpolation of `req.body` keys and values into the multipart wire format without neutralizing carriage return or line feed characters. An attacker can exploit this by providing a payload containing `\r\n` sequences to terminate the current form part and inject entirely new parts. This results in a parameter desynchronization where the proxy's security middleware validates one set of fields while the backend server receives and processes an altered set. The vulnerability is exploitable when the proxy uses a non-multipart parser (like JSON or URL-encoded) for input but forwards the request as multipart. This is fixed in versions 3.0.7 and 4.1.1.
Affected products
- chimurai http-proxy-middleware >= 3.0.4, < 3.0.7; >= 4.0.0, < 4.1.1
Timeline
- 2026-06-17: advisory: GitHub Security Advisory published
- 2026-06-22: disclosed: CVE published to NVD