2.1low
CRLF injection in Tesla.Multipart disposition parameters allows multipart part header injection
- Severity
- 2.1low CVSS:4.0 by EEF
- Exploit likelihood
- 0.28% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- GHSA-28jh-g32x-v9v4EEF-CVE-2026-48598
Description
Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped Content-Disposition parameter values. Tesla.Multipart.part_headers_for_disposition/1 interpolates each disposition parameter as #{k}="#{v}" with no validation of CR (\r), LF (\n), or double-quote characters. The values come verbatim from the caller via Tesla.Multipart.add_field/4 (the name parameter), Tesla.Multipart.add_file/3, and Tesla.Multipart.add_file_content/4 (both the filename parameter and other disposition opts). A " in the value closes the quoted parameter early; a \r\n ends the Content-Disposition header line and starts a new part header (such as a forged Content-Type), or, after a second \r\n, ends the entire part header block and prepends bytes to the part body. The default-filename path in add_file/3 derives the filename via Path.basename/1, which does not strip CR or LF, so any application forwarding a partially-attacker-controlled file path inherits the same issue. This issue affects tesla: from 0.8.0 before 1.18.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| tesla | from 0.8.0 before 1.18.3 | CVE List |
| elixir-tesla/tesla | from 6ebfdb9abe9c6f119408045b933d82462decd351 before bb1a2c3da2775924d96e3db8e315dcc4d5d2246e | CVE List |
| tesla (Hex) | from 0.8.0 before 1.18.3 | GitHub Advisory Database, Erlang Ecosystem Foundation |
| https://github.com/elixir-tesla/tesla | from 6ebfdb9abe9c6f119408045b933d82462decd351 before bb1a2c3da2775924d96e3db8e315dcc4d5d2246e | Erlang Ecosystem Foundation |
| elixir-tesla tesla | from 0.8.0 before 1.18.3 | NVD |
All scores
| EEF | 2.1low CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N |
| NVD | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped Content-Disposition parameter values. Tesla.Multipart.part_headers_for_disposition/1 interpolates each disposition parameter as #{k}="#{v}" with no validation of CR (\r), LF (\n), or double-quote characters. The values come verbatim from the caller via Tesla.Multipart.add_field/4 (the name parameter), Tesla.Multipart.add_file/3, and Tesla.Multipart.add_file_content/4 (both the filename parameter and other disposition opts). A " in the value closes the quoted parameter early; a \r\n ends the Content-Disposition header line and starts a new part header (such as a forged Content-Type), or, after a second \r\n, ends the entire part header block and prepends bytes to the part body. The default-filename path in add_file/3 derives the filename via Path.basename/1, which does not strip CR or LF, so any application forwarding a partially-attacker-controlled file path inherits the same issue. This issue affects tesla: from 0.8.0 before 1.18.3.
GitHub Advisory Database
Summary
Tesla.Multipart.part_headers_for_disposition/1 interpolates Content-Disposition parameter values (field name, filename, and other opts) verbatim into the part header line without encoding or escaping any special characters. An attacker who controls a filename, field name, or other disposition parameter can use unescaped double-quotes to inject extra disposition key-value pairs, or CRLF sequences to inject additional part headers or prepend bytes to the part body.
Details
part_headers_for_disposition/1 in lib/tesla/multipart.ex formats each disposition parameter as k="v" with no sanitization. Values flow in from add_field/4 (the name argument), add_file/3 and add_file_content/4 (the filename argument and any disposition opts). A " in the value closes the quoted parameter early, allowing extra ; key="value" pairs to be appended. A \r\n ends the Content-Disposition header line entirely, with subsequent bytes interpreted as additional part headers (e.g. a forged Content-Type); a second \r\n ends the whole part header block and prepends attacker bytes to the part body.
The default-filename path in add_file/3 derives the name via Path.basename/1, which does not strip CR or LF, so any code that forwards a partially attacker-controlled file path is equally vulnerable.
PoC
- Call
Tesla.Multipart.add_file_content/4with a filename containing\r\nX-Injected: evil. - POST the multipart body to any upstream via any Tesla adapter.
- The upstream receives
X-Injected: evilas a standalone header line on the affected part.
Impact
Low severity (CVSS v4.0: 2.1). Any application using tesla 0.8.0 through 1.18.2 that passes untrusted input into add_field/4, add_file/3, or add_file_content/4 disposition parameters is affected. Consequences range from forging part-level headers to body prepending against lenient multipart parsers. Fixed in tesla 1.18.3.
Workarounds
Validate disposition parameter values before passing them to the multipart API, rejecting any value that contains \r, \n, or ".
Resources
Erlang Ecosystem Foundation
Summary
Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped Content-Disposition parameter values.
Tesla.Multipart.part_headers_for_disposition/1 interpolates each disposition parameter as #{k}="#{v}" with no validation of CR (\r), LF (\n), or double-quote characters. The values come verbatim from the caller via Tesla.Multipart.add_field/4 (the name parameter), Tesla.Multipart.add_file/3, and Tesla.Multipart.add_file_content/4 (both the filename parameter and other disposition opts). A " in the value closes the quoted parameter early; a \r\n ends the Content-Disposition header line and starts a new part header (such as a forged Content-Type), or, after a second \r\n, ends the entire part header block and prepends bytes to the part body. The default-filename path in add_file/3 derives the filename via Path.basename/1, which does not strip CR or LF, so any application forwarding a partially-attacker-controlled file path inherits the same issue.
This issue affects tesla: from 0.8.0 before 1.18.3.
Workarounds
Validate disposition parameter values before passing them to Tesla.Multipart.add_field/4, Tesla.Multipart.add_file/3, or Tesla.Multipart.add_file_content/4, rejecting any value that contains \r, \n, or ".
Configurations
The application must pass untrusted input into a disposition parameter of Tesla.Multipart.add_field/4, Tesla.Multipart.add_file/3, or Tesla.Multipart.add_file_content/4.
NVD (es)
Vulnerabilidad de codificación o escape de salida incorrectos en elixir-tesla tesla permite la inyección de encabezados de parte multipart a través de valores de parámetros Content-Disposition sin escape. Tesla.Multipart.part_headers_for_disposition/1 interpola cada parámetro de disposición como #{k}="#{v}" sin validación de caracteres CR (\r), LF (\n) o comillas dobles. Los valores provienen textualmente del llamador a través de Tesla.Multipart.add_field/4 (el parámetro 'name'), Tesla.Multipart.add_file/3, y Tesla.Multipart.add_file_content/4 (tanto el parámetro 'filename' como otras opciones de disposición). Una ' en el valor cierra el parámetro entre comillas prematuramente; un \r\n termina la línea del encabezado Content-Disposition y comienza un nuevo encabezado de parte (como un Content-Type falsificado), o, después de un segundo \r\n, termina todo el bloque de encabezados de parte y antepone bytes al cuerpo de la parte. La ruta de nombre de archivo predeterminada en add_file/3 deriva el nombre de archivo a través de Path.basename/1, que no elimina CR o LF, por lo que cualquier aplicación que reenvíe una ruta de archivo parcialmente controlada por el atacante hereda el mismo problema. Este problema afecta a tesla: desde 0.8.0 antes de 1.18.3.
References
| https://github.com/elixir-tesla/tesla/security/advisories/GHSA-28jh-g32x-v9v4 | advisory, exploit, related, vendor-advisory, web | |
| https://cna.erlef.org/cves/CVE-2026-48598.html | mitigation, related, third-party-advisory, web | |
| https://osv.dev/vulnerability/EEF-CVE-2026-48598 | related, third-party-advisory, web | |
| https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351 | related, web | |
| https://github.com/elixir-tesla/tesla/commit/bb1a2c3da2775924d96e3db8e315dcc4d5d2246e | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-48598 | advisory | |
| https://github.com/elixir-tesla/tesla | package | |
| https://hex.pm/packages/tesla | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-48598 changed 2026-11-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-28jh-g32x-v9v4 changed 2026-07-10 | CC-BY-4.0 |
| Erlang Ecosystem Foundation | EEF-CVE-2026-48598 changed 2026-11-26 | CC-BY-4.0 |
| NVD | CVE-2026-48598 changed 2026-09-24 | Public domain |