CVE-2026-48596
CRLF injection in Tesla.Multipart.add_content_type_param/2 allows HTTP header injection
Weakness Type (CWE)
CAPEC
Vulnerability description
Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in elixir-tesla tesla allows HTTP header injection via Tesla.Multipart.add_content_type_param/2.Tesla.Multipart.add_content_type_param/2 appends caller-supplied strings to the multipart content_type_params list without validating for CR (\r) or LF (\n) characters. Tesla.Multipart.headers/1 then joins these params verbatim with "; " to construct the outgoing Content-Type header value. A param containing \r\n splits the header line, allowing arbitrary headers to be injected into the outbound HTTP request. Any application that forwards untrusted input (such as a user-supplied charset or parameter string) into add_content_type_param/2 is affected.
This issue affects tesla: from 0.8.0 before 1.18.3.
Affected
pkg:hex/tesla
| Module | Source File | Routine |
|---|---|---|
Tesla.Multipart
|
lib/tesla/multipart.ex
|
Tesla.Multipart.add_content_type_param/2
|
Tesla.Multipart.headers/1
|
pkg:github/elixir-tesla/tesla
| Module | Source File | Routine |
|---|---|---|
Tesla.Multipart
|
lib/tesla/multipart.ex
|
Tesla.Multipart.add_content_type_param/2
|
Tesla.Multipart.headers/1
|
| Status | Type | Version | Changes / Fixed in |
|---|---|---|---|
| affected | git ⓘ | 6ebfdb9abe
|
< 23601edac5
|
Configurations
The application must pass untrusted input into Tesla.Multipart.add_content_type_param/2.
Workarounds
Validate content-type parameter strings before passing them to Tesla.Multipart.add_content_type_param/2, rejecting any value that contains \r or \n.
References
- https://github.com/elixir-tesla/tesla/security/advisories/GHSA-q7jx-v53g-848w vendor-advisory related
- https://osv.dev/vulnerability/EEF-CVE-2026-48596 related
- https://github.com/elixir-tesla/tesla/commit/23601edac5d22ba9407b427967b5bdbda201aec2 patch
Credits
- Finder: Peter Ullrich
- Remediation developer: Yordis Prieto
- Analyst: Jonatan Männchen
CVE record as JSON:
GET /cves/CVE-2026-48596.json
OSV record as JSON:
GET /osv/EEF-CVE-2026-48596.json