SQL Injection Vulnerability in Elixir-Ecto Postgrex Affects Data Security
CVE-2026-66838

5.9MEDIUM

Key Information:

Status
Vendor
CVE Published:
7 August 2026

What is CVE-2026-66838?

A vulnerability in Elixir-Ecto's Postgrex allows attackers to execute SQL Injection via the ':comment' option in Postgrex.stream/4. This flaw occurs because the comment delimiter '*/' can be improperly neutralized, enabling unauthorized SQL commands to be executed under the connection's role. Specifically, the streamed SQL statement can be manipulated as Postgrex concatenates the comment directly into the command without proper escaping. Although the framework attempts to validate this option in other contexts, the validation is bypassed in this streaming function. As a result, attackers could exploit this oversight in versions 0.19.3 up to but not including 0.22.4.

Affected Version(s)

postgrex 0.19.3 < 0.22.4

postgrex 4971a2722fa72f8e1b54a2c403cad4c43916e36d

References

CVSS V4

Score:
5.9
Severity:
MEDIUM
Confidentiality:
High
Integrity:
Low
Availability:
None
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Snehil Shah
José Valim
Jonatan Männchen / EEF
.