Repository navigation
deps: Update dependency tesla to v1.18.3 [SECURITY] - #89
Merged
Merged
Conversation
gagantrivedi
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
1.7.0→1.18.3Decompression bomb in Tesla.Middleware.DecompressResponse and Tesla.Middleware.Compression
CVE-2026-48594 / EEF-CVE-2026-48594 / GHSA-mc85-72gr-vm9f
More information
Details
Summary
Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in elixir-tesla tesla allows a denial of service via decompression bomb in HTTP response bodies.
When
Tesla.Middleware.DecompressResponseorTesla.Middleware.Compressionis included in a Tesla middleware pipeline, HTTP response bodies are decompressed eagerly with no size limit. Thedecompress_body/2function inlib/tesla/middleware/compression.expasses the entire response body to:zlib.gunzip/1or:zlib.unzip/1without any cap on the output size. Additionally,compression_algorithms/1splits thecontent-encodingheader on commas anddecompress_body/2recurses once per token, applying a decompression pass on each iteration. A server advertisingcontent-encoding: gzip, gzip, gzip, gzipcauses four recursive decompression passes, yielding exponential amplification: each gzip layer can expand its input roughly 1000x, so a payload of a few hundred bytes on the wire inflates to gigabytes of BEAM heap, exhausting memory and crashing or freezing the calling process.This issue affects tesla: from 0.6.0 before 1.18.3.
Configurations
The application must include
Tesla.Middleware.DecompressResponseorTesla.Middleware.Compressionin its Tesla middleware pipeline.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
Authorization header leaks to third-party origin on cross-origin redirect in Tesla.Middleware.FollowRedirects
CVE-2026-48595 / EEF-CVE-2026-48595 / GHSA-9m9w-gxf7-rh8m
More information
Details
Summary
Improper Handling of Case Sensitivity vulnerability in elixir-tesla tesla allows credential leakage to a third-party origin on cross-origin redirects.
Tesla.Middleware.FollowRedirectsstrips security-sensitive headers on cross-origin redirects using a case-sensitive string comparison against a lowercase filter list (@filter_headers ["authorization", "host"]). HTTP header names are case-insensitive per RFC 7230, but Tesla preserves header keys verbatim as supplied by the caller without normalizing case. A header set as{"Authorization", "Bearer …"}(the RFC 7235 canonical casing used by virtually all HTTP libraries and documentation) does not match the lowercase filter entry and is forwarded to the redirect destination. An attacker who can control or influence aLocation:response seen by the client (via their own endpoint, a redirect-open upstream, or a compromised origin) receives the bearer token or otherAuthorizationmaterial on the cross-origin request.This issue affects tesla: from 1.4.0 before 1.18.3.
Workarounds
Normalize all header keys to lowercase before passing them to Tesla. Use
"authorization"instead of"Authorization"when setting headers viaTesla.put_header/3orTesla.Middleware.Headers.Configurations
The application must include
Tesla.Middleware.FollowRedirectsin its Tesla middleware pipeline.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
CRLF injection in Tesla.Multipart.add_content_type_param/2 allows HTTP header injection
CVE-2026-48596 / EEF-CVE-2026-48596 / GHSA-q7jx-v53g-848w
More information
Details
Summary
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/2appends caller-supplied strings to the multipartcontent_type_paramslist without validating for CR (\r) or LF (\n) characters.Tesla.Multipart.headers/1then joins these params verbatim with"; "to construct the outgoingContent-Typeheader value. A param containing\r\nsplits 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) intoadd_content_type_param/2is affected.This issue affects tesla: from 0.8.0 before 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\ror\n.Configurations
The application must pass untrusted input into
Tesla.Multipart.add_content_type_param/2.Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:NReferences
This data is provided by OSV.
Atom table exhaustion via untrusted URL scheme in Tesla.Adapter.Mint
CVE-2026-48597 / EEF-CVE-2026-48597 / GHSA-h74c-q9j7-mpcm
More information
Details
Summary
Allocation of Resources Without Limits or Throttling vulnerability in elixir-tesla tesla allows denial of service via atom table exhaustion in
Tesla.Adapter.Mint.Tesla.Adapter.Mint.open_conn/2converts the URL scheme of every outgoing request to a BEAM atom viaString.to_atom(uri.scheme)with no allow-list validation. BEAM atoms are never garbage-collected and the atom table is bounded (approximately 1,048,576 entries by default). An attacker who can influence the URL of a Tesla request — either via an application-level URL-forwarding feature (webhook, proxy, importer) or via aLocationheader returned by a server whenTesla.Middleware.FollowRedirectsis in the pipeline — can mint one fresh permanent atom per request by varying the scheme string. After enough requests the atom table fills and the VM crashes, taking down the entire application.This issue affects tesla: from 1.3.0 before 1.18.3.
Configurations
The application must use
Tesla.Adapter.Mintand either expose a feature that forwards attacker-controlled URLs to Tesla, or includeTesla.Middleware.FollowRedirectsin the middleware pipeline.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
CRLF injection in Tesla.Multipart disposition parameters allows multipart part header injection
CVE-2026-48598 / EEF-CVE-2026-48598 / GHSA-28jh-g32x-v9v4
More information
Details
Summary
Improper Encoding or Escaping of Output vulnerability in elixir-tesla tesla allows multipart part header injection via unescaped
Content-Dispositionparameter values.Tesla.Multipart.part_headers_for_disposition/1interpolates each disposition parameter as#{k}="#{v}"with no validation of CR (\r), LF (\n), or double-quote characters. The values come verbatim from the caller viaTesla.Multipart.add_field/4(thenameparameter),Tesla.Multipart.add_file/3, andTesla.Multipart.add_file_content/4(both thefilenameparameter and other disposition opts). A"in the value closes the quoted parameter early; a\r\nends theContent-Dispositionheader line and starts a new part header (such as a forgedContent-Type), or, after a second\r\n, ends the entire part header block and prepends bytes to the part body. The default-filename path inadd_file/3derives the filename viaPath.basename/1, which does not strip CR or LF, so any application forwarding a partially-attacker-controlled file path inherits the same issue.This issue affects tesla: from 0.8.0 before 1.18.3.
Workarounds
Validate disposition parameter values before passing them to
Tesla.Multipart.add_field/4,Tesla.Multipart.add_file/3, orTesla.Multipart.add_file_content/4, rejecting any value that contains\r,\n, or".Configurations
The application must pass untrusted input into a disposition parameter of
Tesla.Multipart.add_field/4,Tesla.Multipart.add_file/3, orTesla.Multipart.add_file_content/4.Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:NReferences
This data is provided by OSV.
Tesla vulnerable to multipart part smuggling via unescaped
content-dispositionvaluesCVE-2026-48598 / EEF-CVE-2026-48598 / GHSA-28jh-g32x-v9v4
More information
Details
Summary
Tesla.Multipart.part_headers_for_disposition/1interpolatesContent-Dispositionparameter 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/1inlib/tesla/multipart.exformats each disposition parameter ask="v"with no sanitization. Values flow in fromadd_field/4(thenameargument),add_file/3andadd_file_content/4(thefilenameargument and any disposition opts). A"in the value closes the quoted parameter early, allowing extra; key="value"pairs to be appended. A\r\nends theContent-Dispositionheader line entirely, with subsequent bytes interpreted as additional part headers (e.g. a forgedContent-Type); a second\r\nends the whole part header block and prepends attacker bytes to the part body.The default-filename path in
add_file/3derives the name viaPath.basename/1, which does not strip CR or LF, so any code that forwards a partially attacker-controlled file path is equally vulnerable.PoC
Tesla.Multipart.add_file_content/4with a filename containing\r\nX-Injected: evil.X-Injected: evilas a standalone header line on the affected part.Impact
Low severity (CVSS v4.0: 2.1). Any application using
tesla0.8.0 through 1.18.2 that passes untrusted input intoadd_field/4,add_file/3, oradd_file_content/4disposition 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
Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Tesla: Authorization header leaks on cross-origin redirect via case-sensitive filtering
CVE-2026-48595 / EEF-CVE-2026-48595 / GHSA-9m9w-gxf7-rh8m
More information
Details
Summary
Tesla.Middleware.FollowRedirectsis meant to strip theAuthorizationheader when following a cross-origin redirect, but performs the check with a case-sensitive comparison against the lowercase string"authorization". Because Tesla preserves header keys exactly as supplied by the caller, any application that sets the header with its RFC 7235 canonical casing ("Authorization") bypasses the filter entirely, leaking bearer tokens or other credentials to whatever origin the redirect points at.Details
The filter list in
lib/tesla/middleware/follow_redirects.exis defined as@filter_headers ["authorization", "host"]and the membership checkk not in @filter_headerscompares the raw key string without case normalization. HTTP header names are case-insensitive per RFC 7230, but Tesla stores them verbatim. A header tuple{"Authorization", "Bearer …"}does not match"authorization", so it passes through the filter and is forwarded to the redirect destination unchecked. The same defect applies to the"Host"entry.An attacker who can control a
Location:response seen by the victim client (their own endpoint, a redirect-open service, or a compromised upstream) receives the credential on the cross-origin follow. No special configuration is required beyond the victim using the standard header casing.PoC
Tesla.Middleware.FollowRedirectsand set theAuthorizationheader using canonical casing ({"Authorization", "Bearer <token>"}).302redirect to a different origin.Authorizationheader with its value is present in the request delivered to the redirect destination.Impact
High severity (CVSS v4.0: 8.2). Any application using
tesla1.4.0 through 1.18.2 withTesla.Middleware.FollowRedirectsand a non-lowercaseAuthorizationheader is affected. The workaround is to use all-lowercase"authorization"as the header key until upgrading to 1.18.3.Workarounds
Normalize all header keys to lowercase before passing them to Tesla. Use
"authorization"instead of"Authorization"when setting headers viaTesla.put_header/3orTesla.Middleware.Headers.Resources
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Tesla vulnerable to atom exhaustion via untrusted URL scheme
CVE-2026-48597 / EEF-CVE-2026-48597 / GHSA-h74c-q9j7-mpcm
More information
Details
Summary
In the Mint adapter for the Tesla HTTP client library,
Tesla.Adapter.Mint.open_conn/2passes the URL scheme of every outgoing request throughString.to_atom/1with no allow-list validation. Because BEAM atoms are permanent (never garbage-collected) and the atom table is bounded at roughly 1,048,576 entries, an attacker who can vary the URL scheme across requests can mint one fresh atom per request and eventually exhaust the table, crashing the VM.Details
Vulnerable call (
lib/tesla/adapter/mint.ex,open_conn/2): the scheme field parsed from the request URI is passed directly toString.to_atom/1before being forwarded toMint.HTTP.connect/4. Even thoughMintraises for unrecognised schemes, the atom is already interned by that point. The function's HTTPS-branch guard confirms that no scheme normalisation occurs beforehand.The attack surface has two entry points. First, any application-level URL-forwarding feature (webhook relay, link preview, SSRF-style proxy) where untrusted input reaches
Tesla.get/2or equivalent. Second, any pipeline that includesTesla.Middleware.FollowRedirects: a server under the attacker's control can return aLocationheader with a novel scheme, triggering the atom creation on the redirect follow.PoC
Tesla.Adapter.Mint.atk1://,atk2://, ...).Mintrejects the connection but the atom persists.Impact
High severity (CVSS v4.0: 8.2). Any application using
tesla1.3.0 through 1.18.2 withTesla.Adapter.Mintthat allows untrusted input to influence request URLs is vulnerable to remote denial of service. No authentication or special privileges are required beyond access to the application's HTTP endpoint. Fixed in tesla 1.18.3.Configurations
The application must use
Tesla.Adapter.Mintand either expose a feature that forwards attacker-controlled URLs to Tesla, or includeTesla.Middleware.FollowRedirectsin the middleware pipeline.References
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Tesla has decompression bomb on response body
CVE-2026-48594 / EEF-CVE-2026-48594 / GHSA-mc85-72gr-vm9f
More information
Details
Summary
Any Tesla client pipeline that includes
Tesla.Middleware.DecompressResponseorTesla.Middleware.Compressioneagerly decompresses HTTP response bodies with no size limit. A server under attacker control (or reached via a redirect) can return a tiny gzip-encoded payload that expands into gigabytes of BEAM heap, crashing or freezing the calling process. Stacking multiplecontent-encodingtokens multiplies the amplification exponentially.Details
decompress_body/2inlib/tesla/middleware/compression.expasses the full response body to:zlib.gunzip/1or:zlib.unzip/1with no cap on output size. The list of codec tokens comes from splitting thecontent-encodingheader on commas, anddecompress_body/2recurses once per token. A response advertisingcontent-encoding: gzip, gzip, gzip, gziptriggers four recursive decompression passes. Each gzip layer can expand its input roughly 1000x, so a 284-byte wire payload with four layers inflates to approximately 1 GB at the innermost pass, all materialised as a single binary in the caller's heap.PoC
content-encoding: gzip, gzip, gzip, gzipwhere the body is a 1 GB block of zeros compressed through four successive gzip passes.Tesla.Middleware.DecompressResponse.decompress_body/2recurses four times without any size check, materialising ~1 GB in the calling process's heap.Impact
High severity (CVSS v4.0: 8.2). Any application using
tesla0.6.0 through 1.18.2 withTesla.Middleware.DecompressResponseorTesla.Middleware.Compressionin its pipeline is vulnerable. The attacker only needs to control a server the client contacts, including via redirects. Fixed in tesla 1.18.3.Configurations
The application must include
Tesla.Middleware.DecompressResponseorTesla.Middleware.Compressionin its Tesla middleware pipeline.Resources
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Tesla has CRLF injection in request
Content-Typeheader viaadd_content_type_paramCVE-2026-48596 / EEF-CVE-2026-48596 / GHSA-q7jx-v53g-848w
More information
Details
Summary
Tesla.Multipart.add_content_type_param/2appends caller-supplied strings to the multipartContent-Typeheader with no validation. A param value containing\r\nsplits 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/2inlib/tesla/multipart.exstores the supplied string directly inmultipart.content_type_paramswithout any CR/LF check.headers/1then joins all params with"; "and appends the result verbatim to theContent-Typeheader 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
Tesla.Multipart.add_content_type_param/2with a value containing\r\nX-Injected: pwned.Multipartstruct as the request body via any Tesla adapter.X-Injected: pwnedas a standalone header line.Impact
Low severity (CVSS v4.0: 2.1). Any application using
tesla0.8.0 through 1.18.2 that passes untrusted input intoTesla.Multipart.add_content_type_param/2is 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\ror\n.Reesources
Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
elixir-tesla/tesla (tesla)
v1.18.3Compare Source
Features
Security CVE
content-dispositionvaluesContent-Typeheader viaadd_content_type_paramv1.18.2Compare Source
Bug Fixes
v1.18.1Compare Source
Bug Fixes
v1.18.0Compare Source
Features
Bug Fixes
v1.17.0Compare Source
Features
assignsandprivatefields toTesla.Env(#836) (b8b622c)Bug Fixes
use Tesladeprecation warning (#832) (b8fb158)v1.16.0Compare Source
Features
Bug Fixes
v1.15.3Compare Source
Bug Fixes
v1.15.2Compare Source
Bug Fixes
v1.15.1Compare Source
Bug Fixes
v1.15.0Compare Source
Features
:levelinstead of deprecated:log_level(#779) (ffc3609)Bug Fixes
v1.14.3Compare Source
Bug Fixes
v1.14.2Compare Source
Bug Fixes
v1.14.1Compare Source
Bug Fixes
v1.14.0Compare Source
Features
Bug Fixes
v1.13.2Compare Source
What's Changed
Full Changelog: elixir-tesla/tesla@v1.13.1...v1.13.2
v1.13.1Compare Source
What's Changed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.