# CVE-2026-118391: Unbounded query cache growth from interpolated JSON paths and splice lists in Ecto

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.9
- **CVSS:** 8.9 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.87% (percentile 56, 2026-11-28)
- **CWE:** CWE-770
- **Published:** 2026-11-04T13:57:29.762Z
- **Modified:** 2026-11-12T20:07:11.090Z

## Who should check

- Anyone running elixir-ecto ecto \>= 3.4.0, \< 3.14.3
- Anyone running elixir-ecto ecto \>= cb2f03964dac324a9771f84f5088e395326e6de8, \< eef014ad090d27d1a5b69c0e32a50eabd44ab3bb

## 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.

## Affected and fixed versions

- elixir-ecto ecto: \>= 3.4.0, \< 3.14.3 (cvelist)
- elixir-ecto ecto: \>= cb2f03964dac324a9771f84f5088e395326e6de8, \< eef014ad090d27d1a5b69c0e32a50eabd44ab3bb (cvelist)

## Mitigation

- Upgrade ecto to 3.14.3 or later.
- Vendor workaround: 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-118391. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-118391.md
Affected: elixir-ecto ecto >= 3.4.0, < 3.14.3; elixir-ecto ecto >= cb2f03964dac324a9771f84f5088e395326e6de8, < eef014ad090d27d1a5b69c0e32a50eabd44ab3bb
Fixed in: elixir-ecto ecto 3.14.3

Steps:
1. Search this machine and project for elixir-ecto ecto: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-118391 being exploited?

There is no confirmed exploitation: CVE-2026-118391 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.87% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-118391?

High: CVSS 8.9 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-118391?

elixir-ecto ecto \>= 3.4.0, \< 3.14.3; elixir-ecto ecto \>= cb2f03964dac324a9771f84f5088e395326e6de8, \< eef014ad090d27d1a5b69c0e32a50eabd44ab3bb.

### Is there a fix for CVE-2026-118391?

Yes. Fixed in elixir-ecto ecto 3.14.3. Upgrade ecto to 3.14.3 or later. Vendor workaround: 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.

### How do I check if I'm affected by CVE-2026-118391?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/elixir-ecto/ecto/security/advisories/GHSA-cxjx-vmm2-qr8r>
- patch: <https://github.com/elixir-ecto/ecto/commit/d0e97d8a6e274c81c25fbf08087da8d8b9bae0ea>
- patch: <https://github.com/elixir-ecto/ecto/commit/eb03f45b999e2bf67ffae92811233eb6e56dba55>
- patch: <https://github.com/elixir-ecto/ecto/commit/cb2f03964dac324a9771f84f5088e395326e6de8>
- patch: <https://github.com/elixir-ecto/ecto/commit/eef014ad090d27d1a5b69c0e32a50eabd44ab3bb>
- article: <https://ecto.hexdocs.pm/Ecto.Query.API.html#json_extract_path/2>
- article: <https://ecto.hexdocs.pm/Ecto.Query.API.html#splice/1>
- other: <https://cna.erlef.org/cves/CVE-2026-118391.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-118391>
- other: <https://github.com/elixir-ecto/ecto/issues/4470>
- other: <https://github.com/elixir-ecto/ecto/issues/1031>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-118391>

HTML: <https://flawdb.com/CVE-2026-118391> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-118391>
