SQL Injection in Elixir Ecto
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability tracked as CVE-2026-66838 has been found in Elixir Ecto.
Confidential information can be exposed externally. CVSS score: 8.2/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "Elixir Ecto CVE-2026-66838" on the vendor's site.
CVE-2026-66838 (Elixir Ecto) — CWE-89 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
SQL injection (CWE-89) exists in Elixir Ecto.
Check the vendor advisory for the affected versions of Elixir Ecto.
Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで Elixir Ecto を使っているサービスとバージョンを洗い出す。
-
2
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Hexpostgrex |
≥ 0.19.3, < 0.22.4→ 0.22.4 |
0.22.4 |
| elixir-ectopostgrex |
≥ 4971a2722fa72f8e1b54a2c403cad4c43916e36d (no fix yet)→ 4011be852c99dc61ddb98cb01aa41e8775a0e3dd, e1ecba618ddea4cee2556bd6ad9b6285e05f9d3c |
4011be852c99dc61ddb98cb01aa41e8775a0e3dd, e1ecba618ddea4cee2556bd6ad9b6285e05f9d3c |
Original description The description as published by the source.
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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package hex.pm
- package github.com
- patch github.com
- patch github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web repo.hex.pm