CVE-2026-66838SQL injection via the :comment option in Postgrex.stream/4
Updated under an hour ago ()
Does this affect you?
It affects elixir-ecto postgrex. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
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
- 5.9 MEDIUM (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
- Weakness (CWE)
- CWE-89
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- EEF
- NVD analysis
- Analyzed
- Record last updated
- Aug 7, 2026
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
elixir-ecto postgrex elixir-ecto:postgrex | from 0.19.3 before 0.22.4 | CNA record |
elixir-ecto postgrex elixir-ecto:postgrex | from 0.19.3 before 0.22.4 | NVD |
References
- https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388vendor-advisory, related, exploit, patch
- https://cna.erlef.org/cves/CVE-2026-66838.htmlrelated, patch, third-party-advisory
- https://osv.dev/vulnerability/EEF-CVE-2026-66838related, patch, third-party-advisory
- https://github.com/elixir-ecto/postgrex/commit/e1ecba618ddea4cee2556bd6ad9b6285e05f9d3cpatch
- https://github.com/elixir-ecto/postgrex/commit/4011be852c99dc61ddb98cb01aa41e8775a0e3ddpatch
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.