CVE-2026-48596: Tesla Tesla Has CRLF Injection Vulnerability

LOW
Advisory Identifier: GHSA-q7jx-v53g-848w
CWE-113 CWE-93
Published
Advisory Summary

CVE-2026-48596 is a LOW tesla has crlf injection vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Tesla libraries in the Hex ecosystem. The issue involves tesla has crlf injection in request `content-type` header via `add_content_type_param`. Remediation is available by upgrading affected packages to version 1.18.3.

CVE-2026-48596 at a Glance

CVE Identifier CVE-2026-48596
GHSA Identifier GHSA-q7jx-v53g-848w
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
Affected Product Tesla
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2026-48596

To remediate this vulnerability, upgrade all affected Tesla dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tesla fixed: 1.18.3
Upgrade tesla to 1.18.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for tesla

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-48596, inspect your project dependencies for Tesla:

inspect dependencies for tesla

Analyze the terminal output to locate any version of Tesla in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.18.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Tesla, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `Tesla.Multipart.add_content_type_param/2` appends caller-supplied strings to the multipart `Content-Type` header with no validation. A param value containing `\r\n` splits the header line, allowing an attacker who controls any content-type parameter (charset, boundary parameter, etc.) to inject arbitrary headers into the outbound HTTP request. ### Details `add_content_type_param/2` in `lib/tesla/multipart.ex` stores the supplied string directly in `multipart.content_type_params` without any CR/LF check. `headers/1` then joins all params with `"; "` and appends the result verbatim to the `Content-Type` header value. Because HTTP headers are delimited by `\r\n`, a param containing that sequence breaks out of the header field and introduces new header lines before the adapter writes the request to the socket. The precondition is that untrusted input reaches `add_content_type_param/2`, which is the normal pattern for applications that accept user-supplied charset values, file type parameters, or any other content-type extension fields. ### PoC 1. Call `Tesla.Multipart.add_content_type_param/2` with a value containing `\r\nX-Injected: pwned`. 2. Pass the resulting `Multipart` struct as the request body via any Tesla adapter. 3. The raw request on the wire contains `X-Injected: pwned` as a standalone header line. ### Impact Low severity (CVSS v4.0: 2.1). Any application using `tesla` 0.8.0 through 1.18.2 that passes untrusted input into `Tesla.Multipart.add_content_type_param/2` is affected. Consequences range from forging arbitrary outbound request headers to potential request smuggling against the upstream server. Fixed in tesla 1.18.3. ### 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`. ### Reesources * Introduction commit: https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351 * Patch commit: https://github.com/elixir-tesla/tesla/commit/23601edac5d22ba9407b427967b5bdbda201aec2

CVE-2026-48596 Affected Tesla Versions

1 component(s)
Fixed Versions:
1.18.3
Product / Package Ecosystem Affected Versions Fixed Version
tesla
Hex
≥ 0.8.0
< 1.18.3
1.18.3

References

Frequently Asked Questions

What is CVE-2026-48596?
CVE-2026-48596 is a security vulnerability in Tesla involving Tesla has CRLF injection in request `Content-Type` header via `add_content_type_param` under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Tesla versions are affected?
Affected versions include releases prior to 1.18.3 across affected packages: tesla.
What version fixes CVE-2026-48596?
Upgrading to 1.18.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tesla affected?
Yes, tesla is affected in releases prior to 1.18.3. Upgrade your dependency to 1.18.3 or later.
What CWE is associated with CVE-2026-48596?
CVE-2026-48596 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.).
How can I check Hex dependencies for CVE-2026-48596?
Run the dependency tree command: 'inspect dependencies for tesla'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q7jx-v53g-848w",
  "modified" : "2026-07-10T00:03:12Z",
  "published" : "2026-07-10T00:03:12Z",
  "aliases" : [ "CVE-2026-48596" ],
  "summary" : "Tesla has CRLF injection in request `Content-Type` header via `add_content_type_param`",
  "details" : "### Summary\n\n`Tesla.Multipart.add_content_type_param/2` appends caller-supplied strings to the multipart `Content-Type` header with no validation. A param value containing `\\r\\n` splits the header line, allowing an attacker who controls any content-type parameter (charset, boundary parameter, etc.) to inject arbitrary headers into the outbound HTTP request.\n\n### Details\n\n`add_content_type_param/2` in `lib/tesla/multipart.ex` stores the supplied string directly in `multipart.content_type_params` without any CR/LF check. `headers/1` then joins all params with `\"; \"` and appends the result verbatim to the `Content-Type` header value. Because HTTP headers are delimited by `\\r\\n`, a param containing that sequence breaks out of the header field and introduces new header lines before the adapter writes the request to the socket.\n\nThe precondition is that untrusted input reaches `add_content_type_param/2`, which is the normal pattern for applications that accept user-supplied charset values, file type parameters, or any other content-type extension fields.\n\n### PoC\n\n1. Call `Tesla.Multipart.add_content_type_param/2` with a value containing `\\r\\nX-Injected: pwned`.\n2. Pass the resulting `Multipart` struct as the request body via any Tesla adapter.\n3. The raw request on the wire contains `X-Injected: pwned` as a standalone header line.\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 `Tesla.Multipart.add_content_type_param/2` is affected. Consequences range from forging arbitrary outbound request headers to potential request smuggling against the upstream server. Fixed in tesla 1.18.3.\n\n### Workarounds\n\nValidate content-type parameter strings before passing them to `Tesla.Multipart.add_content_type_param/2`, rejecting any value that contains `\\r` or `\\n`.\n\n### Reesources\n\n* Introduction commit: https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351\n* Patch commit: https://github.com/elixir-tesla/tesla/commit/23601edac5d22ba9407b427967b5bdbda201aec2",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "tesla"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.0"
      }, {
        "fixed" : "1.18.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/elixir-tesla/tesla/security/advisories/GHSA-q7jx-v53g-848w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48596"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elixir-tesla/tesla/commit/23601edac5d22ba9407b427967b5bdbda201aec2"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2026-48596.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elixir-tesla/tesla"
  }, {
    "type" : "WEB",
    "url" : "https://osv.dev/vulnerability/EEF-CVE-2026-48596"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-113", "CWE-93" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-10T00:03:12Z",
    "nvd_published_at" : "2026-06-02T20:16:38Z"
  }
}