{"id":"CVE-2026-49756","published":"2026-06-08T15:20:24Z","modified":"2026-11-20T08:43:05Z","title":"Multipart form-data header injection in Req via unescaped name/filename/content_type","vendor":"wojtekmach","product":"req","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.1,"severity":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00345,"percentile":0.20531,"provenance":"source"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"}],"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/60253dbe9436cb8e9c738f895032f2e87939b597","tags":["related"]},{"url":"https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23","tags":["patch"]},{"url":"https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba","tags":["patch"]}],"priority":{"score":5.6,"factors":[{"name":"EPSS percentile","points":4.11},{"name":"CVSS severity","points":1.47}]},"vendorSlug":"wojtekmach","affectedVersions":[{"vendor":"wojtekmach","product":"req","versions":[">= 0.5.3, < 0.6.0"]},{"vendor":"wojtekmach","product":"req","versions":[">= 60253dbe9436cb8e9c738f895032f2e87939b597"]}],"fixedVersions":[{"vendor":"wojtekmach","product":"req","versions":["2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23","74506ff2c5addf74df85d79dc726e9b2e264a8ba"]}],"workarounds":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-33","name":"HTTP Request Smuggling"},{"id":"CAPEC-105","name":"HTTP Request Splitting"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-08T16:05:54.070488Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Hex","package":"req","vulnerableRanges":[">=0.5.3, <0.6.0"],"patched":["0.6.0"],"from":["GHSA-px9f-whj3-246m"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-35096","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-wojtekmach-req-cve-2026-49755","children":[{"from":"CVE-2026-49756","to":"CVE-2026-49755","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Hex:req","fromFixed":"0.6.0","toFixed":"0.6.1","daysApart":0},{"kind":"same-code","provenance":"machine","files":["lib/req.ex","lib/req/steps.ex"],"commits":["https://github.com/wojtekmach/req/commit/e37753741cbdc725e6aba3d977b380163bfc0ecb","https://github.com/wojtekmach/req/commit/84977e5b1a83f26e749d55ad06e3625464af4e8d","https://github.com/wojtekmach/req/commit/60253dbe9436cb8e9c738f895032f2e87939b597","https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-49756","published":"2026-06-08","fixed":"0.6.0","kev":false},{"cve":"CVE-2026-49755","published":"2026-06-08","fixed":"0.6.1","kev":false}],"package":"Hex:req"}}