Unbounded query cache growth from interpolated JSON paths and splice lists in Ecto
Affects Ecto from 3.4.0 before 3.14.3 when request data reaches an interpolated JSON path or a request-controlled splice/1 list, on repositories with the default query_cache: true. Fixed in 3.14.3.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fixed in 3.14.3
- Who is exposed
- Default setups
Do first: Check every install: default setups are affected.
- Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
- Exposure22/25Default setups, reachable over the network without a login
- Reach10/20Affects Hex packages
- Severity8.9/10CVSS 8.9
- No patch0/5No signal
What would change the score
- Would score about 81 if added to CISA KEV
- Would score about 76 if CISA's SSVC rates exploitation active
CVE-2026-118391 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 8.9 (high) and affects ecto; fixed in 3.14.3.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 41/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Default setups
- Fix
- Fixed in 3.14.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Ecto, an Elixir database library, is affected by a flaw in which an unauthenticated attacker can remotely exhaust memory in both the application and its database server by sending requests with many distinct JSON keys or list lengths that the application interpolates into queries. The attacker needs no login, and the memory stays in use until the affected processes restart. This affects Ecto from 3.4.0 before the fixed release.
Read the original 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.
What to do
Check every install: default setups are affected.
Upgrade to a fixed version: 3.14.3.
Workaround: Pass the path as a query parameter, or disable the cache for these queries with Repo.all(query, query_cache: false), or restrict keys and list lengths to a known set.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- ectoHex
From 3.4.0 · fixed in 3.14.3
- elixir-ecto/ecto
Version range not reported
- ectoHex
From 3.4.0 · fixed in 3.14.3
Evidence 11
- Advisory
- Patch
- Patch
- Repository
- Repository
Show all 11 sourcesShow fewer sources
- Repository
- Repository
- Link
- Link
- Link
- Link
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-118391
Is CVE-2026-118391 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
What does this mean?
The query cache grows without limit when query shapes vary with request data, such as an interpolated JSON path or a request-controlled splice/1 list, and cached entries are not released until the processes restart. This can exhaust memory in both the application and the database server.Source: cve.org, cna.erlef.org
Which versions are affected by CVE-2026-118391?
ecto (Hex): from 3.4.0 before 3.14.3. ecto (Hex): from 3.4.0 before 3.14.3.Source: cve.now feed data
Am I affected, and how do I check?
Ecto versions from 3.4.0 before 3.14.3 are in scope. The setup also needs request data passed into an interpolated JSON path or a request-controlled list passed into splice/1, with queries run through a repository that keeps the default query_cache: true. To check, look at the ecto version in mix.lock or the output of mix deps, and search the code for splice( and interpolated JSON paths.Source: cve.org, cna.erlef.org
How do I fix CVE-2026-118391?
Upgrade Ecto to 3.14.3 or later, which is the fixed version.Source: cve.org, cna.erlef.org