Am I affected?

type your tesla version to check

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.

Weaknesses & attack patterns

Weakness

CWE-113 · Improper Neutralization of CRLF Sequences in HTTP Headers in catalog → MITRE ↗

Attack patterns

CAPEC-105 · HTTP Request Splitting MITRE ↗

Affected — Hex / tesla Hex.pm ↗ Repository ↗

≥ 0.8.0 < 1.18.3 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*
version type semver
modules · source files · routines
modules 'Elixir.Tesla.Multipart'
source files lib/tesla/multipart.ex
routines 'Elixir.Tesla.Multipart':add_content_type_param/2 · 'Elixir.Tesla.Multipart':headers/1

Affected — GitHub / elixir-tesla/tesla Repository ↗

≥ 6ebfdb9 < 23601ed affected
every other version: unaffected
cpe cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules 'Elixir.Tesla.Multipart'
source files lib/tesla/multipart.ex
routines 'Elixir.Tesla.Multipart':add_content_type_param/2 · 'Elixir.Tesla.Multipart':headers/1

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.

Configurations

The application must pass untrusted input into Tesla.Multipart.add_content_type_param/2.

References

Credits

Peter Ullrich Finder
Jonatan Männchen / EEF Analyst
Yordis Prieto Remediation developer

CVSS breakdown

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

Exploitability

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
None
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
Low
Availability
None
« All CVEs