Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-66838— SQL injection via the :comment option in Postgrex.stream/4

Quick assessment

Affected
elixir-ecto postgrex
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

elixir-ecto Postgrex是elixir-ecto组织的一款基于Elixir的数据库驱动连接工具。 elixir-ecto Postgrex 0.19.3版本至0.22.4之前版本存在SQL注入漏洞,该漏洞源于对SQL命令中特殊元素的中和不当,攻击者可通过Postgrex.stream/4的:comment选项注入SQL,关闭注释分隔符并扩展流式语句,以连接的角色执行任意子句。

CVSS 5.9 · Medium EPSS 0.40% · P33

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application

Affected Version Matrix 2

VendorProduct Version RangeStatus
elixir-ecto postgrex 0.19.3< 0.22.4 affected
4971a2722fa72f8e1b54a2c403cad4c43916e36d< * affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-66838

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
SQL injection via the :comment option in Postgrex.stream/4
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
SQL命令中使用的特殊元素转义处理不恰当(SQL注入)
Source: CVE Program / CVE List V5
Vulnerability Title
elixir-ecto Postgrex SQL注入漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
elixir-ecto Postgrex是elixir-ecto组织的一款基于Elixir的数据库驱动连接工具。 elixir-ecto Postgrex 0.19.3版本至0.22.4之前版本存在SQL注入漏洞,该漏洞源于对SQL命令中特殊元素的中和不当,攻击者可通过Postgrex.stream/4的:comment选项注入SQL,关闭注释分隔符并扩展流式语句,以连接的角色执行任意子句。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
elixir-ecto postgrex 0.19.3 ~ 0.22.4 cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*
elixir-ecto postgrex 4971a2722fa72f8e1b54a2c403cad4c43916e36d ~ * cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*

II. Public POCs for CVE-2026-66838

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-66838

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-66838 (2)

Vendor Advisories for CVE-2026-66838 (3)

IV. Related Vulnerabilities

V. Comments for CVE-2026-66838

No comments yet


Leave a comment