Read the docs
TI-2026-47460 Aliases CVE-2026-66838

SQL injection via the :comment option in Postgrex.stream/4

Priority MEDIUM 60CWE-89Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
SQL injection
Confidentiality · integrity · availability
High · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-89.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00403 34th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed postgrex (elixir-ecto): 0.22.4

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
elixir-ectopostgrex0.19.3 to before 0.22.40.22.4Patch availableCNA
  • postgrex Vendorelixir-ecto Affected 0.19.3 to before 0.22.4 Fixed in 0.22.4 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*0.19.3 to before 0.22.4Vulnerableelixir-ecto
  • cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:* Versions 0.19.3 to before 0.22.4 Vulnerable ·elixir-ecto

Remediation

  • Fix · CNA postgrex (elixir-ecto) Fixed in 0.22.4

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-66838

References

  • TI-2026-25179 SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3 CVSS 4.0HIGH 7.5

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences