CVE-2026-49756
Multipart form-data header injection in Req via unescaped name/filename/content_type
Mitigation
- Upgrade req to 0.6.0 or later.
- Vendor workaround: 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.
Who should check
- Anyone running wojtekmach req >= 0.5.3, < 0.6.0
- Anyone running wojtekmach req >= 60253dbe9436cb8e9c738f895032f2e87939b597, < *
Vulnerability facts
- Affected
- wojtekmach req >= 0.5.3, < 0.6.0; wojtekmach req >= 60253dbe9436cb8e9c738f895032f2e87939b597, < *
- Fixed in
- wojtekmach req 0.6.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.1 (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: None
- EPSS
- 0.34% chance of exploitation in 30 days (percentile 21, 2026-11-26)
- CWE
- CWE-93
- Modified
Description
Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in wojtekmach Req allows multipart parameter smuggling via attacker-influenced part metadata. Req.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. This 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. This issue affects req: from 0.5.3 before 0.6.0.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| wojtekmach req | >= 0.5.3, < 0.6.0 | — | cvelist |
| wojtekmach req | >= 60253dbe9436cb8e9c738f895032f2e87939b597, < * | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-49756. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-49756.md Affected: wojtekmach req >= 0.5.3, < 0.6.0; wojtekmach req >= 60253dbe9436cb8e9c738f895032f2e87939b597, < * Fixed in: wojtekmach req 0.6.0 Steps: 1. Search this machine and project for wojtekmach req: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
FAQ
Is CVE-2026-49756 being exploited?
There is no confirmed exploitation: CVE-2026-49756 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-49756?
Low: CVSS 2.1 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-49756?
wojtekmach req >= 0.5.3, < 0.6.0; wojtekmach req >= 60253dbe9436cb8e9c738f895032f2e87939b597, < *.
Is there a fix for CVE-2026-49756?
Yes. Fixed in wojtekmach req 0.6.0. Upgrade req to 0.6.0 or later. Vendor workaround: 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.
How do I check if I'm affected by CVE-2026-49756?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.