{"id":"CVE-2026-49756","state":"PUBLISHED","title":"Multipart form-data header injection in Req via unescaped name/filename/content_type","description":"Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in wojtekmach Req allows multipart parameter smuggling via attacker-influenced part metadata.\n\nReq.Utils.encode_form_part/2 in lib/req/utils.ex builds the per-part headers by interpolating the caller-supplied name, filename, and content_type values directly into the content-disposition and content-type lines with no escaping or CRLF stripping. A value containing \", \\r, or \\n closes the surrounding quoted value and starts a new header line; an additional \\r\\n--<boundary> terminates the current part and prepends a smuggled part of the attacker's choosing.\n\nThis is reachable through every supported way of supplying a part. It is particularly easy when value is a %File.Stream{}, because filename then defaults to Path.basename(stream.path) and POSIX filenames may legitimately contain \\r and \\n. Any application that forwards user-controlled filenames (or field names / MIME types) through Req.post/2 with form_multipart: lets an attacker inject arbitrary headers into the outgoing multipart body or smuggle additional fields and parts into the request the victim service sends downstream.\n\nThis issue affects req: from 0.5.3 before 0.6.0.","publishedAt":"2026-06-08T15:20:24.035Z","updatedAt":"2026-06-08T16:34:58.505Z","severity":{"score":2.1,"label":"Low","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N","source":"EEF"},"assigner":"EEF","products":["wojtekmach req"],"affected":[{"vendor":"wojtekmach","product":"req","packageName":"req","packageURL":"pkg:hex/req","defaultStatus":"unaffected","versions":[{"version":"0.5.3","status":"affected","lessThan":"0.6.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Req.Utils'"],"programFiles":["lib/req/utils.ex"],"programRoutines":[{"name":"'Elixir.Req.Utils':encode_form_part/2"}],"repo":"https://github.com/wojtekmach/req"},{"vendor":"wojtekmach","product":"req","packageName":"wojtekmach/req","packageURL":"pkg:github/wojtekmach/req","defaultStatus":"unaffected","versions":[{"version":"60253dbe9436cb8e9c738f895032f2e87939b597","status":"affected","lessThan":"74506ff2c5addf74df85d79dc726e9b2e264a8ba","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Req.Utils'"],"programFiles":["lib/req/utils.ex"],"programRoutines":[{"name":"'Elixir.Req.Utils':encode_form_part/2"}],"repo":"https://github.com/wojtekmach/req.git"}],"references":["https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m","https://cna.erlef.org/cves/CVE-2026-49756.html","https://osv.dev/vulnerability/EEF-CVE-2026-49756","https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba"],"weaknesses":["CWE-93"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/49xxx/CVE-2026-49756.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-49756","state":"PUBLISHED","datePublished":"2026-06-08T15:20:24.035Z","dateUpdated":"2026-06-08T16:34:58.505Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-06-01T13:45:22.448Z"},"containers":{"cna":{"title":"Multipart form-data header injection in Req via unescaped name/filename/content_type","descriptions":[{"lang":"en","value":"Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in wojtekmach Req allows multipart parameter smuggling via attacker-influenced part metadata.\n\nReq.Utils.encode_form_part/2 in lib/req/utils.ex builds the per-part headers by interpolating the caller-supplied name, filename, and content_type values directly into the content-disposition and content-type lines with no escaping or CRLF stripping. A value containing \", \\r, or \\n closes the surrounding quoted value and starts a new header line; an additional \\r\\n--<boundary> terminates the current part and prepends a smuggled part of the attacker's choosing.\n\nThis is reachable through every supported way of supplying a part. It is particularly easy when value is a %File.Stream{}, because filename then defaults to Path.basename(stream.path) and POSIX filenames may legitimately contain \\r and \\n. Any application that forwards user-controlled filenames (or field names / MIME types) through Req.post/2 with form_multipart: lets an attacker inject arbitrary headers into the outgoing multipart body or smuggle additional fields and parts into the request the victim service sends downstream.\n\nThis issue affects req: from 0.5.3 before 0.6.0."}],"affected":[{"vendor":"wojtekmach","product":"req","packageName":"req","packageURL":"pkg:hex/req","defaultStatus":"unaffected","versions":[{"version":"0.5.3","status":"affected","lessThan":"0.6.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Req.Utils'"],"programFiles":["lib/req/utils.ex"],"programRoutines":[{"name":"'Elixir.Req.Utils':encode_form_part/2"}],"repo":"https://github.com/wojtekmach/req"},{"vendor":"wojtekmach","product":"req","packageName":"wojtekmach/req","packageURL":"pkg:github/wojtekmach/req","defaultStatus":"unaffected","versions":[{"version":"60253dbe9436cb8e9c738f895032f2e87939b597","status":"affected","lessThan":"74506ff2c5addf74df85d79dc726e9b2e264a8ba","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Req.Utils'"],"programFiles":["lib/req/utils.ex"],"programRoutines":[{"name":"'Elixir.Req.Utils':encode_form_part/2"}],"repo":"https://github.com/wojtekmach/req.git"}],"references":[{"url":"https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-49756.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-49756","tags":["related"]},{"url":"https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba","tags":["patch"]}],"metrics":[{"cvssV4_0":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":2.1,"baseSeverity":"LOW","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","userInteraction":"NONE","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-93","description":"CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-06-08T16:34:58.505Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*","versionEndExcluding":"0.6.0","versionStartIncluding":"0.5.3","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Wojtek Mach"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-33","descriptions":[{"lang":"en","value":"CAPEC-33 HTTP Request Smuggling"}]},{"capecId":"CAPEC-105","descriptions":[{"lang":"en","value":"CAPEC-105 HTTP Request Splitting"}]}],"source":{"discovery":"EXTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Sanitize attacker-influenced <tt>name</tt>, <tt>filename</tt>, and <tt>content_type</tt> values before passing them to <tt>'Elixir.Req':post/2</tt> with <tt>form_multipart:</tt>. At minimum, reject (or strip) any value containing <tt>\\r</tt>, <tt>\\n</tt>, or <tt>\"</tt>. When forwarding uploads, derive <tt>filename</tt> from a normalised string rather than <tt>Path.basename/1</tt> on a user-controlled path.</p>"}],"value":"Sanitize attacker-influenced name, filename, and content_type values before passing them to Req.post/2 with form_multipart:. At minimum, reject (or strip) any value containing \\r, \\n, or \". When forwarding uploads, derive filename from a normalised string rather than Path.basename/1 on a user-controlled path."}],"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-08T16:05:54.070488Z","id":"CVE-2026-49756","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-08T16:05:58.580Z"}}]}}}