Am I affected?

type your tesla version to check

Description

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/2 converts the URL scheme of every outgoing request to a BEAM atom via String.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 a Location header returned by a server when Tesla.Middleware.FollowRedirects is 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.

Weaknesses & attack patterns

Weakness

CWE-770 · Allocation of Resources Without Limits or Throttling in catalog → MITRE ↗

Attack patterns

CAPEC-130 · Excessive Allocation MITRE ↗

Affected — Hex / tesla Hex.pm ↗ Repository ↗

1.3.0 < 1.18.3 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Tesla.Adapter.Mint'
source files lib/tesla/adapter/mint.ex
routines 'Elixir.Tesla.Adapter.Mint':open_conn/2

Affected — GitHub / elixir-tesla/tesla Repository ↗

ccd0823 < 4699c3c affected
every other version: unaffected
cpe cpe:2.3:a:elixir-tesla:tesla:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Tesla.Adapter.Mint'
source files lib/tesla/adapter/mint.ex
routines 'Elixir.Tesla.Adapter.Mint':open_conn/2

Configurations

The application must use Tesla.Adapter.Mint and either expose a feature that forwards attacker-controlled URLs to Tesla, or include Tesla.Middleware.FollowRedirects in the middleware pipeline.

References

Credits

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

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
« All CVEs