CVE-2026-66838
Elixir-ecto Postgrex SQL injection
- Published7 Aug 2026
Description
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in elixir-ecto postgrex allows SQL Injection via the :comment option of Postgrex.stream/4. An attacker who can influence that value can close the comment delimiter with */ and extend the streamed statement with their own clauses, which execute under the connection's role. Ecto exposes the same option through Ecto.Repo.stream/2. Postgrex appends the comment by concatenating it into the statement text sent in the Parse message, without escaping or rejecting */. The option is validated by comment_not_present!/1 at every other execution point; stream/4 never calls it. Because Parse accepts a single command, the injection is confined to the streamed statement and further statements cannot be chained. This issue affects postgrex: from 0.19.3 before 0.22.4.
CVSS 3.1 breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:NAffected products
Remediation
- https://cna.erlef.org/cves/CVE-2026-66838.html
- https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388
- https://github.com/elixir-ecto/postgrex/commit/4011be852c99dc61ddb98cb01aa41e8775a0e3dd
- https://github.com/elixir-ecto/postgrex/commit/e1ecba618ddea4cee2556bd6ad9b6285e05f9d3c
- https://osv.dev/vulnerability/EEF-CVE-2026-66838
References
- https://cna.erlef.org/cves/CVE-2026-66838.html
- https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388
- https://github.com/elixir-ecto/postgrex/commit/4011be852c99dc61ddb98cb01aa41e8775a0e3dd
- https://github.com/elixir-ecto/postgrex/commit/e1ecba618ddea4cee2556bd6ad9b6285e05f9d3c
- https://osv.dev/vulnerability/EEF-CVE-2026-66838
Related CVEs
Recent high-severity vulnerabilities sharing a weakness type.
Frequently asked
Is CVE-2026-66838 being actively exploited?
CVE-2026-66838 is not in the CISA KEV catalog. A public exploit reference exists, so treat it as exploitable. Its EPSS exploit probability is 0.40%.
How severe is CVE-2026-66838?
CVE-2026-66838 has a CVSS 3.1 base score of 8.2, rated high. EPSS estimates a 0.40% probability of exploitation.
Which products are affected by CVE-2026-66838?
Affected products include Elixir-ecto Postgrex.
How do I fix CVE-2026-66838?
Upgrade affected software to a fixed version, for example Elixir-ecto Postgrex 0.22.4 or later, then confirm no affected versions remain in your inventory.
How Secuno handles this
Secuno correlates vulnerabilities like CVE-2026-66838 against the real software inventory on every managed device, every day. Rather than a static severity, each match is scored in context: exploit availability, EPSS, the asset's exposure, and business criticality decide where it lands in the queue. If an affected version is present anywhere across your portfolio, it surfaces automatically with a prioritised remediation path.
Data from the NVD, CISA KEV catalog and FIRST EPSS. CVSS 3.1 base score shown where available.