CVE-2026-49756

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

Configuration 1 (hide)

cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*

History

20 Nov 2026, 09:20

Type Values Removed Values Added
References
  • () https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23 -
  • () https://github.com/wojtekmach/req/commit/60253dbe9436cb8e9c738f895032f2e87939b597 -
References () https://cna.erlef.org/cves/CVE-2026-49756.html - Third Party Advisory, Mitigation () https://cna.erlef.org/cves/CVE-2026-49756.html - Mitigation, Third Party Advisory

18 Aug 2026, 19:15

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 3.7
First Time Wojtekmach req
Wojtekmach
CPE cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*
References () https://cna.erlef.org/cves/CVE-2026-49756.html - () https://cna.erlef.org/cves/CVE-2026-49756.html - Third Party Advisory, Mitigation
References () https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba - () https://github.com/wojtekmach/req/commit/74506ff2c5addf74df85d79dc726e9b2e264a8ba - Patch
References () https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m - () https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m - Vendor Advisory
References () https://osv.dev/vulnerability/EEF-CVE-2026-49756 - () https://osv.dev/vulnerability/EEF-CVE-2026-49756 - Third Party Advisory

23 Jul 2026, 07:10

Type Values Removed Values Added
Summary
  • (es) La vulnerabilidad de Neutralización Incorrecta de Secuencias CRLF ('Inyección CRLF') en wojtekmach Req permite el contrabando de parámetros multipart a través de metadatos de parte influenciados por el atacante. Req.Utils.encode_form_part/2 en lib/req/utils.ex construye los encabezados por parte interpolando los valores de nombre, nombre de archivo y tipo de contenido suministrados por el llamador directamente en las líneas de content-disposition y content-type sin escape ni eliminación de CRLF. Un valor que contiene ", \r, o \n cierra el valor entre comillas circundante y comienza una nueva línea de encabezado; un \r\n--<boundary> adicional termina la parte actual y antepone una parte contrabandeada a elección del atacante. Esto es alcanzable a través de cada forma compatible de suministrar una parte. Es particularmente fácil cuando el valor es un %File.Stream{}, porque el nombre de archivo por defecto es Path.basename(stream.path) y los nombres de archivo POSIX pueden contener legítimamente \r y \n. Cualquier aplicación que reenvíe nombres de archivo controlados por el usuario (o nombres de campo / tipos MIME) a través de Req.post/2 con form_multipart: permite a un atacante inyectar encabezados arbitrarios en el cuerpo multipart saliente o contrabandear campos y partes adicionales en la solicitud que el servicio víctima envía aguas abajo. Este problema afecta a req: desde 0.5.3 antes de 0.6.0.

08 Jun 2026, 17:16

Type Values Removed Values Added
References () https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m - () https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m -

08 Jun 2026, 16:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-06-08 16:16

Updated : 2026-11-20 09:20


NVD link : CVE-2026-49756

Mitre link : CVE-2026-49756

CVE.ORG link : CVE-2026-49756


JSON object : View

Products Affected

wojtekmach

  • req
CWE
CWE-93

Improper Neutralization of CRLF Sequences ('CRLF Injection')