CVE-2026-49756: CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection') in wojtekmach req
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.
AI Analysis
Technical Summary
The vulnerability in wojtekmach req (version 0.5.3) is due to improper neutralization of CRLF sequences in multipart form data construction. The function Req.Utils.encode_form_part/2 builds multipart headers by directly inserting caller-controlled strings (name, filename, content_type) into content-disposition and content-type headers without sanitization. This allows an attacker to inject CRLF characters to prematurely terminate header lines and inject additional headers or multipart sections, effectively enabling multipart parameter smuggling. This is especially exploitable when filenames come from File.Stream paths, which may contain CR or LF characters. The vulnerability affects any usage of Req.post/2 with form_multipart: true that forwards user-controlled multipart metadata downstream.
Potential Impact
An attacker can inject arbitrary headers or additional multipart parts into HTTP requests sent by applications using the vulnerable req version. This can lead to multipart parameter smuggling, potentially causing the downstream service to process maliciously crafted multipart data. The impact is limited by the low CVSS score (2.1) and requires local or low-privilege attacker influence on multipart metadata. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid forwarding user-controlled filenames, field names, or MIME types through Req.post/2 with form_multipart enabled. Sanitize or validate multipart metadata to strip or escape CR and LF characters before passing them to the req library. Monitor vendor channels for updates and apply official patches once available.
CVE-2026-49756: CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection') in wojtekmach req
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.
CVSS v4.0
Score 2.1low
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in wojtekmach req (version 0.5.3) is due to improper neutralization of CRLF sequences in multipart form data construction. The function Req.Utils.encode_form_part/2 builds multipart headers by directly inserting caller-controlled strings (name, filename, content_type) into content-disposition and content-type headers without sanitization. This allows an attacker to inject CRLF characters to prematurely terminate header lines and inject additional headers or multipart sections, effectively enabling multipart parameter smuggling. This is especially exploitable when filenames come from File.Stream paths, which may contain CR or LF characters. The vulnerability affects any usage of Req.post/2 with form_multipart: true that forwards user-controlled multipart metadata downstream.
Potential Impact
An attacker can inject arbitrary headers or additional multipart parts into HTTP requests sent by applications using the vulnerable req version. This can lead to multipart parameter smuggling, potentially causing the downstream service to process maliciously crafted multipart data. The impact is limited by the low CVSS score (2.1) and requires local or low-privilege attacker influence on multipart metadata. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid forwarding user-controlled filenames, field names, or MIME types through Req.post/2 with form_multipart enabled. Sanitize or validate multipart metadata to strip or escape CR and LF characters before passing them to the req library. Monitor vendor channels for updates and apply official patches once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-06-01T13:45:22.448Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a26e46de29bf47b501e5322
Added to database: 6/8/2026, 3:49:01 PM
Last enriched: 6/8/2026, 4:04:28 PM
Last updated: 6/8/2026, 5:17:55 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.