- Accueil
- Vulnérabilités
- CVE-2026-118391
CVE-2026-118391
Unbounded query cache growth from interpolated JSON paths and splice lists in Ecto
Résumé
Allocation of Resources Without Limits or Throttling vulnerability in elixir-ecto ecto allows an unauthenticated remote attacker to exhaust memory in the application and in the database server by sending requests with distinct JSON keys or list lengths where the application interpolates them into json_extract_path/2, field[^key] or splice/1. Ecto caches prepared queries per repository in an ETS table with no size limit and no eviction. Interpolated JSON path elements become part of the query expression instead of its parameters, and splice/1 expands into one placeholder per element, so every distinct key or list length creates a new cache entry. With ecto_sql each entry is also a new prepared statement on the database connection that runs it. None of this memory is released until the processes restart. This issue affects ecto: from 3.4.0 before 3.14.3.
Aucune traduction française : description d’origine affichée.
Produits et versions affectés
Elixir-ecto (1 ligne(s))
| Produit | Versions | Corrigé dans | Source |
|---|---|---|---|
| ecto | de 3.4.0 (inclus) à 3.14.3 (exclu) |
— | CNA (éditeur ou attributeur) |
Correctif
Correctifsource officielle
Upgrade Ecto to 3.14.3 or later. Queries with interpolated JSON path elements or an interpolated splice/1 list are no longer cached, the same as running them with query_cache: false, so distinct keys and list lengths don't add cache entries.
Source : CNA (éditeur ou attributeur)
Contournement
Contournementsource officielle
Pass the path as a query parameter so it is not part of the cache key. With PostgreSQL: fragment("? #> ?", i.meta, type(^path, {:array, :string})). Alternatively, disable the cache for these queries with Repo.all(query, query_cache: false), or restrict keys and list lengths to a known set before building the query.
Source : CNA (éditeur ou attributeur)
Savoir si vous êtes touché
Aucune méthode de vérification renseignée.
Chronologie
- — Publication de la CVE (cve)
Références
- https://github.com/elixir-ecto/ecto/commit/d0e97d8a6e274c81c25fbf08087da8d8b9bae0eapatch
- https://github.com/elixir-ecto/ecto/commit/eef014ad090d27d1a5b69c0e32a50eabd44ab3bbpatch
- https://github.com/elixir-ecto/ecto/security/advisories/GHSA-cxjx-vmm2-qr8rvendor-advisory, related
- https://cna.erlef.org/cves/CVE-2026-118391.htmlrelated
- https://osv.dev/vulnerability/EEF-CVE-2026-118391related
- https://ecto.hexdocs.pm/Ecto.Query.API.html#json_extract_path/2technical-description
- https://ecto.hexdocs.pm/Ecto.Query.API.html#splice/1technical-description
- https://github.com/elixir-ecto/ecto/commit/eb03f45b999e2bf67ffae92811233eb6e56dba55related
- https://github.com/elixir-ecto/ecto/issues/4470related
- https://github.com/elixir-ecto/ecto/issues/1031related
- https://github.com/elixir-ecto/ecto/commit/cb2f03964dac324a9771f84f5088e395326e6de8related
Provenance des données
- Statut
- NVD
- Date de publication
- NVD
- Description
- CNA (éditeur ou attributeur)
- Score CVSS
- CNA (éditeur ou attributeur)
- Faiblesse (CWE)
- CNA (éditeur ou attributeur)
- Vecteur CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:(CVSS 4.0, CNA:6b3ad84c-e1a6-4bf7-a703-f496b71e49db)- Faiblesse
- CWE-770 · Autre (CWE-770)