{"id":"CVE-2026-48598","aliases":["CVE-2026-48598","GHSA-28jh-g32x-v9v4","EEF-CVE-2026-48598"],"related":[],"kind":"vulnerability","state":"published","title":"CRLF injection in Tesla.Multipart disposition parameters allows multipart part header injection","summary":"Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped Content-Disposition parameter values.\n\nTesla.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.\n\nThis issue affects tesla: from 0.8.0 before 1.18.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped Content-Disposition parameter values.\n\nTesla.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.\n\nThis issue affects tesla: from 0.8.0 before 1.18.3.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`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.\n\n### Details\n\n`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.\n\nThe 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.\n\n### PoC\n\n1. Call `Tesla.Multipart.add_file_content/4` with a filename containing `\\r\\nX-Injected: evil`.\n2. POST the multipart body to any upstream via any Tesla adapter.\n3. The upstream receives `X-Injected: evil` as a standalone header line on the affected part.\n\n### Impact\n\nLow 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.\n\n### Workarounds\n\nValidate disposition parameter values before passing them to the multipart API, rejecting any value that contains `\\r`, `\\n`, or `\"`.\n\n### Resources\n\n* Introduction commit: https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351\n* Patch commit: https://github.com/elixir-tesla/tesla/commit/bb1a2c3da2775924d96e3db8e315dcc4d5d2246e","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nImproper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped `Content-Disposition` parameter values.\n\n`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.\n\nThis issue affects tesla: from 0.8.0 before 1.18.3.\n\n## Workarounds\n\nValidate 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 `\"`.\n\n## Configurations\n\nThe 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`.","format":"markdown","source":"eef"},{"lang":"es","text":"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.\n\nTesla.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.\n\nEste problema afecta a tesla: desde 0.8.0 antes de 1.18.3.","source":"nvd"}],"published":"2026-06-02T19:08:19.921Z","modified":"2026-11-26T17:23:04.462Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"}],"cwes":["CWE-116"],"affected":[{"ranges":[{"type":"semver","introduced":"0.8.0","fixed":"1.18.3","status":"affected"}],"vendor":"elixir-tesla","product":"tesla","package":"tesla","cpe":"cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-tesla/tesla","source":"cvelist"},{"ranges":[{"type":"git","introduced":"6ebfdb9abe9c6f119408045b933d82462decd351","fixed":"bb1a2c3da2775924d96e3db8e315dcc4d5d2246e","status":"affected"}],"vendor":"elixir-tesla","product":"tesla","package":"elixir-tesla/tesla","cpe":"cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-tesla/tesla","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.8.0","status":"affected","fixed":"1.18.3"}],"ecosystem":"Hex","package":"tesla","purl":"pkg:hex/tesla","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.8.0","status":"affected","fixed":"1.18.3"}],"ecosystem":"Hex","package":"tesla","purl":"pkg:hex/tesla","source":"eef"},{"ranges":[{"type":"git","introduced":"6ebfdb9abe9c6f119408045b933d82462decd351","status":"affected","fixed":"bb1a2c3da2775924d96e3db8e315dcc4d5d2246e"}],"repo":"https://github.com/elixir-tesla/tesla","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.8.0","fixed":"1.18.3"}],"vendor":"elixir-tesla","product":"tesla","cpe":"cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/elixir-tesla/tesla/security/advisories/GHSA-28jh-g32x-v9v4","tags":["advisory","exploit","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-48598.html","tags":["mitigation","related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-48598","tags":["related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-tesla/tesla/commit/bb1a2c3da2775924d96e3db8e315dcc4d5d2246e","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48598","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/elixir-tesla/tesla","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/tesla","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Yordis Prieto"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-03T14:58:39.064Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48598","url":"https://www.cve.org/CVERecord?id=CVE-2026-48598","licence":"CVE Terms of Use","modified":"2026-11-19T08:24:40.712Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-28jh-g32x-v9v4","url":"https://github.com/advisories/GHSA-28jh-g32x-v9v4","licence":"CC-BY-4.0","modified":"2026-07-10T00:15:09.250Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-48598","url":"https://osv.dev/vulnerability/EEF-CVE-2026-48598","licence":"CC-BY-4.0","modified":"2026-11-26T17:23:04.462Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48598","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48598","licence":"Public domain","modified":"2026-09-24T21:17:13.760Z"}],"updatedAt":"2026-11-26T17:37:05.116Z","epss":{"score":0.00279,"percentile":0.21846,"date":"2026-12-01T12:00:22.000Z"}}