chore(deps): update dependency http-proxy-middleware to v4.1.1 [security]#7939
Merged
chenjiahan merged 1 commit intoJun 18, 2026
Merged
Conversation
chenjiahan
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.1.0→4.1.1http-proxy-middleware: multipart/form-data field injection via unescaped CRLF in
fixRequestBodyCVE-2026-55603 / GHSA-gcq2-9pq2-cxqm
More information
Details
Summary
fixRequestBody()is the library's documented helper for re-emitting a request body that was already consumed by a body parser. When the outgoingContent-Typeismultipart/form-data, it rebuilds the body withhandlerFormDataBodyData(), which interpolates eachreq.bodykey and value directly into the multipart wire format without neutralizing CR/LF:A
\r\ninside 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 onreq.bodyis 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/jsonusesJSON.stringify(escapes control chars) andapplication/x-www-form-urlencodedusesquerystring.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:req.bodywith a non-multipart parser (express.urlencoded,express.json, or text) so an injected boundary in a value is not split on input.multipart/form-data(e.g. an adaptation layer, or any flow that sets the upstream content-type to multipart), so the vulnerable branch runs.fixRequestBody(the documented pattern for "I body-parsed, now re-stream"), and an attacker controls at least one body field value or key.Impact
When the preconditions hold, an attacker injects/overrides multipart fields seen only by the backend:
role=adminis bypassed; backend grants admin).filename="..."part into the upstream multipart stream.Proof of Concept
Output: one input field becomes two parts;
role=adminwas injected via the unescaped CRLF:req.bodyhad a single key (user), so any gateway policy checkingreq.body.rolepasses, yet the backend's multipart parser receivesrole=admin. On the wire the attacker simply sends, asapplication/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:(Reject is preferable to silent stripping, to avoid masking malicious input.)
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
chimurai/http-proxy-middleware (http-proxy-middleware)
v4.1.1Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.