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

Goal: 1000 CNY · Raised: 1336 CNY

100%

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

CVSS 5.9 · Medium

Possible ATT&CK Techniques 1AI

T1190 · Exploit Public-Facing Application
Get alerts for future matching vulnerabilitiesLog 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

Affected Products

VendorProductAffected VersionsCPESubscribe
elixir-ectopostgrex 0.19.3 ~ 0.22.4 cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*
elixir-ectopostgrex 4971a2722fa72f8e1b54a2c403cad4c43916e36d ~ * cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*

II. Public POCs for CVE-2026-66838

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

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