CVE-2026-66838
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.
Weakness
- CWE-89: Improper Neutralization of Special Elements used in an SQL Command
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-08-07 |
Timeline
- 2026-08-07Published by the CNA12:20 UTC
- 2026-08-07CISA SSVC decision recordedsame day
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| elixir-ecto postgrex | from 0.19.3 before 0.22.4fixed in 0.22.4 | 0.22.4 |
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
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-66838'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-66838'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-66838'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-66838'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).