CVE-2026-118391
Unbounded query cache growth from interpolated JSON paths and splice lists in Ecto
- High 8.9
Description
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.
Key facts
- Published
- 4 Nov 2026
- Last changed
- 5 Nov 2026
- Assigned by
- EEF
- EPSS
- 0.494% likely to be exploited in the next 30 days, higher than 42.977% of CVEs (scores for 16 Nov 2026)
- SSVC (CISA)
- Exploitation: none; Automatable: yes; Technical impact: partial
Severity scores
Each score is shown as its source gave it. They are not averaged or merged.
- 8.9CVSS 4.0, Highfrom the CNA (EEF)
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
What to do
- 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.CNA solution statement
- 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.CNA workaround statement
Historical context and remediation
This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.
An unauthenticated client can make the application and its database keep memory from every request that carries a new JSON key or list length, when the application passes it into an interpolated JSON path or splice/1. Nothing frees that memory until the processes restart. In the proof of concept, 200 requests with 100 MB of keys in total left 191 MB in the BEAM and 289 MB in the PostgreSQL backend of one connection. Sustained requests exhaust memory in the application node, the database server, or both. (CNA impact statement)
Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| elixir-ecto | ecto |
|
| elixir-ecto | ecto |
|
Timeline
- 4 Nov 2026 Published
Weakness
References
- GHSA-cxjx-vmm2-qr8r
- EEF CNA record for CVE-2026-118391
- OSV record EEF-CVE-2026-118391
- Do not cache queries with interpolated JSON paths, splices, and constants (main)
- Ecto.Query.API.json_extract_path/2
- Ecto.Query.API.splice/1
- Add splice to fragment (#4228), v3.11.0
- Should we allow disabling of Ecto cache on specific queries? (#4470)
- String interpolation will grow cached unboundedly (#1031)
- Introducing commit cb2f039 in elixir-ecto/ecto
- Fix commit eef014a in elixir-ecto/ecto