CVE-2026-48597 Overview
CVE-2026-48597 is a denial-of-service vulnerability in the elixir-tesla HTTP client library affecting versions 1.3.0 through 1.18.2. The flaw resides in Tesla.Adapter.Mint.open_conn/2, which converts the URL scheme of every outgoing request into a BEAM atom using String.to_atom(uri.scheme) without any allow-list validation. Because BEAM atoms are never garbage-collected and the atom table is capped at approximately 1,048,576 entries, an attacker who can influence the request URL scheme can mint one permanent atom per request. Once the atom table fills, the Erlang VM crashes and the entire application terminates [CWE-770].
Critical Impact
Remote, unauthenticated attackers can crash any Elixir application using the Mint adapter by triggering enough requests with unique URL schemes, bringing down the entire BEAM VM.
Affected Products
- elixir-tesla/tesla versions >= 1.3.0 and < 1.18.3
- Applications using Tesla.Adapter.Mint as the HTTP adapter
- Applications using Tesla.Middleware.FollowRedirects in their middleware pipeline
Discovery Timeline
- 2026-06-02 - CVE-2026-48597 published to NVD
- 2026-06-03 - Last updated in NVD database
Technical Details for CVE-2026-48597
Vulnerability Analysis
The vulnerability stems from unbounded atom creation in Tesla.Adapter.Mint.open_conn/2. Every outgoing HTTP request passes its URL scheme through String.to_atom/1 before being handed to Mint.HTTP.connect/4. The BEAM atom table is a global, append-only structure with a hard limit near 1,048,576 entries. Atoms are not reclaimed by garbage collection, so any code path that converts attacker-controlled strings to atoms becomes a resource-exhaustion sink.
An attacker exploits this by repeatedly causing Tesla to make requests with novel URL schemes such as aaaa://, aaab://, and so on. Each unique scheme allocates a new permanent atom. After exhausting the atom table, the Erlang VM aborts with system_limit, terminating every supervised process and taking the application offline.
Root Cause
The root cause is the use of String.to_atom/1 on untrusted input without an allow-list of permitted schemes such as http and https. The function is documented as unsafe for external input precisely because of this exhaustion risk. The Mint adapter applied no validation before atom conversion.
Attack Vector
Exploitation requires the attacker to influence the URL scheme used by a Tesla request. Two practical paths exist. First, application-level URL forwarding features such as webhooks, proxies, or importers that accept user-supplied URLs pass directly into the adapter. Second, when Tesla.Middleware.FollowRedirects is present in the pipeline, a malicious server can return a Location header with an arbitrary scheme, and Tesla will follow it and mint a new atom for that scheme.
defp open_conn(uri, opts) do
- opts =
- with "https" <- uri.scheme,
- global_cacertfile when not is_nil(global_cacertfile) <-
- Application.get_env(:tesla, Tesla.Adapter.Mint)[:cacert] do
- Map.update(opts, :transport_opts, [cacertfile: global_cacertfile], fn tr_opts ->
- Keyword.put_new(tr_opts, :cacertfile, global_cacertfile)
- end)
- else
- _ -> opts
- end
+ with {:ok, scheme} <- parse_scheme(uri.scheme) do
+ opts =
+ with :https <- scheme,
+ global_cacertfile when not is_nil(global_cacertfile) <-
+ Application.get_env(:tesla, Tesla.Adapter.Mint)[:cacert] do
+ Map.update(opts, :transport_opts, [cacertfile: global_cacertfile], fn tr_opts ->
+ Keyword.put_new(tr_opts, :cacertfile, global_cacertfile)
+ end)
+ else
+ _ -> opts
+ end
- opts = Map.put_new(opts, :mode, :passive)
+ opts = Map.put_new(opts, :mode, :passive)
- with {:ok, conn} <-
- HTTP.connect(String.to_atom(uri.scheme), uri.host, uri.port, Enum.into(opts, [])) do
Source: GitHub Commit 4699c3cb3e. The patch replaces unbounded String.to_atom/1 with a parse_scheme/1 helper that validates against a fixed allow-list before producing an atom.
Detection Methods for CVE-2026-48597
Indicators of Compromise
- Sustained growth of the BEAM atom count toward the 1,048,576 limit, observable via :erlang.system_info(:atom_count).
- Application crashes with system_limit errors referencing atom table exhaustion in crash.dump files.
- Outbound HTTP requests with unusual or non-standard URL schemes such as random alphanumeric strings followed by ://.
- Spikes in 3xx redirect responses from a single upstream returning varied Location header schemes.
Detection Strategies
- Instrument applications with telemetry that polls :erlang.system_info(:atom_count) and alerts when the value exceeds a baseline threshold.
- Log the parsed scheme of every URL submitted to user-facing URL-forwarding features and alert on schemes outside http/https.
- Inspect Tesla middleware configurations to identify services running Tesla.Middleware.FollowRedirects with the Mint adapter and vulnerable versions.
Monitoring Recommendations
- Forward BEAM VM telemetry, including atom count and process count, to a centralized monitoring platform for trend analysis.
- Monitor application restart frequency and supervisor crash logs for patterns consistent with VM termination.
- Track outbound request schemes at the egress proxy or service mesh to identify anomalous protocol values.
How to Mitigate CVE-2026-48597
Immediate Actions Required
- Upgrade tesla to version 1.18.3 or later, which validates URL schemes against an allow-list before atom conversion.
- Audit application code that accepts user-supplied URLs and forwards them through Tesla, applying scheme validation at the application boundary.
- Review whether Tesla.Middleware.FollowRedirects is required, and if so, restrict allowed redirect schemes explicitly.
Patch Information
The fix is committed in 4699c3cb3e2fd6078f99f45f11cf7466aeedbf0e and shipped in tesla1.18.3. The patched code introduces a parse_scheme/1 function that returns {:ok, :http} or {:ok, :https} for known schemes and an error tuple otherwise, eliminating attacker-controlled atom creation. See the GitHub Security Advisory GHSA-h74c-q9j7-mpcm and the CNA Erlef advisory for full details.
Workarounds
- Switch the Tesla adapter to one not affected by this issue, such as Tesla.Adapter.Hackney or Tesla.Adapter.Finch, until upgrading is possible.
- Remove Tesla.Middleware.FollowRedirects from middleware pipelines that handle requests to untrusted destinations.
- Validate and normalize URL schemes at the application layer before invoking Tesla, rejecting anything that is not http or https.
# Update mix.exs to require the patched version
# {:tesla, "~> 1.18.3"}
mix deps.update tesla
mix deps.get
mix compile
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

