# CVE-2026-49756: Multipart form-data header injection in Req via unescaped name/filename/content\_type

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.1
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.34% (percentile 21, 2026-11-28)
- **CWE:** CWE-93
- **Published:** 2026-06-08T15:20:24.035Z
- **Modified:** 2026-11-20T09:20:12.753Z

## Who should check

- Anyone running wojtekmach req \>= 0.5.3, \< 0.6.0
- Anyone running wojtekmach req \>= 60253dbe9436cb8e9c738f895032f2e87939b597, \< \*

## 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

- wojtekmach req: \>= 0.5.3, \< 0.6.0 (cvelist)
- wojtekmach req: \>= 60253dbe9436cb8e9c738f895032f2e87939b597, \< \* (cvelist)

## 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m>
- patch: <https://github.com/wojtekmach/req/commit/60253dbe9436cb8e9c738f895032f2e87939b597>
- patch: <https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23>
- patch: <https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba>
- other: <https://cna.erlef.org/cves/CVE-2026-49756.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-49756>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-49756>

HTML: <https://flawdb.com/CVE-2026-49756> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-49756>
