CVE-2026-48598: Tesla Tesla Vulnerable To Multipart Part Vulnerability

LOW
Advisory Identifier: GHSA-28jh-g32x-v9v4
CWE-116
Published
Advisory Summary

CVE-2026-48598 is a LOW tesla vulnerable to multipart part vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Tesla libraries in the Hex ecosystem. The issue involves tesla vulnerable to multipart part smuggling via unescaped `content-disposition` values. Remediation is available by upgrading affected packages to version 1.18.3.

CVE-2026-48598 at a Glance

CVE Identifier CVE-2026-48598
GHSA Identifier GHSA-28jh-g32x-v9v4
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Tesla
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2026-48598

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-48598, 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. 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.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. ### Details `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. The 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. ### PoC 1. Call `Tesla.Multipart.add_file_content/4` with a filename containing `\r\nX-Injected: evil`. 2. POST the multipart body to any upstream via any Tesla adapter. 3. The upstream receives `X-Injected: evil` as a standalone header line on the affected part. ### Impact Low 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. ### Workarounds Validate disposition parameter values before passing them to the multipart API, rejecting any value that contains `\r`, `\n`, or `"`. ### Resources * Introduction commit: https://github.com/elixir-tesla/tesla/commit/6ebfdb9abe9c6f119408045b933d82462decd351 * Patch commit: https://github.com/elixir-tesla/tesla/commit/bb1a2c3da2775924d96e3db8e315dcc4d5d2246e

CVE-2026-48598 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-48598?
CVE-2026-48598 is a security vulnerability in Tesla involving Tesla vulnerable to multipart part smuggling via unescaped `content-disposition` values under CWE-116: Improper Encoding or Escaping of Output.
Which Tesla versions are affected?
Affected versions include releases prior to 1.18.3 across affected packages: tesla.
What version fixes CVE-2026-48598?
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-48598?
CVE-2026-48598 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check Hex dependencies for CVE-2026-48598?
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-28jh-g32x-v9v4",
  "modified" : "2026-07-10T00:04:37Z",
  "published" : "2026-07-10T00:04:37Z",
  "aliases" : [ "CVE-2026-48598" ],
  "summary" : "Tesla vulnerable to multipart part smuggling via unescaped `content-disposition` values",
  "details" : "### 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",
  "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-28jh-g32x-v9v4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48598"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elixir-tesla/tesla/commit/bb1a2c3da2775924d96e3db8e315dcc4d5d2246e"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2026-48598.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elixir-tesla/tesla"
  }, {
    "type" : "WEB",
    "url" : "https://osv.dev/vulnerability/EEF-CVE-2026-48598"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-10T00:04:37Z",
    "nvd_published_at" : "2026-06-02T20:16:38Z"
  }
}