Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in elixir-tesla tesla allows HTTP header injection via Tesla.Multipart.addcontenttype_param/2.
Tesla.Multipart.addcontenttypeparam/2 appends caller-supplied strings to the multipart contenttypeparams 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 addcontenttypeparam/2 is affected.
This issue affects tesla: from 0.8.0 before 1.18.3.
Validate content-type parameter strings before passing them to Tesla.Multipart.addcontenttype_param/2, rejecting any value that contains \r or \n.
The application must pass untrusted input into Tesla.Multipart.addcontenttype_param/2.
{
"capec_ids": [
"CAPEC-105"
],
"cpe_ids": [
"cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*"
],
"cwe_ids": [
"CWE-113"
]
}