| Title | Elixir-ectoのPostgrexにおけるSQL インジェクションの脆弱性 |
|---|---|
| Summary | elixir-ectoのpostgrex('Elixir.Postgrex.Notifications'モジュール)におけるSQLコマンドで使用される特殊要素の不適切な無害化により、SQLインジェクションの脆弱性が存在します。'Elixir.Postgrex.Notifications'モジュールのlisten/3およびunlisten/3に渡されるchannel引数は、LISTEN "..." / UNLISTEN "..." SQL文内で文字がエスケープされずに直接挿入されます。攻撃者がチャネル名を操作できる場合、引用符で囲まれた識別子を抜け出すために"を注入し、任意のSQLを追加できます。通知接続はPostgreSQLのシンプルクエリプロトコルを使用しているため、複数ステートメントのペイロードが許容され、DDLやDMLコマンドの連結(例:; DROP TABLE ...; --)も可能です。同様の無検証の挿入は、再接続後にLISTENコマンドを再生するhandle_connect/1内でも発生します。この脆弱性はlib/postgrex/notifications.exファイル内の'Elixir.Postgrex.Notifications'のlisten/3、unlisten/3、handle_connect/1ルーチンに関連しています。本問題はpostgrexバージョン0.16.0から0.22.2未満、GitHubパッケージelixir-ecto/postgrex@266b530faf9bde094e31e0e4ab851f933fadc0f5から0.22.2未満に影響します。 |
| Possible impacts | 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 |
| Solution | 正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | May 12, 2026, midnight |
| Registration Date | May 25, 2026, 10:25 a.m. |
| Last Update | May 25, 2026, 10:25 a.m. |
| CVSS3.0 : 重要 | |
| Score | 7.8 |
|---|---|
| Vector | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Elixir-ecto |
| Postgrex 0.16.0 以上 0.22.0 未満 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年05月25日] 掲載 |
May 25, 2026, 10:25 a.m. |
| Summary | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in elixir-ecto postgrex ('Elixir.Postgrex.Notifications' module) allows SQL Injection. The channel argument passed to 'Elixir.Postgrex.Notifications':listen/3 and 'Elixir.Postgrex.Notifications':unlisten/3 is interpolated directly into LISTEN "..." / UNLISTEN "..." SQL statements without escaping the " character. An attacker who can influence the channel name can inject a " to break out of the quoted identifier and append arbitrary SQL. Because the notifications connection uses the PostgreSQL simple query protocol, multi-statement payloads are accepted, allowing DDL and DML commands to be chained (e.g. ; DROP TABLE ...; --). The same unsanitized interpolation also occurs in handle_connect/1 when replaying LISTEN commands after a reconnect. This vulnerability is associated with program file lib/postgrex/notifications.ex and program routines 'Elixir.Postgrex.Notifications':listen/3, 'Elixir.Postgrex.Notifications':unlisten/3, 'Elixir.Postgrex.Notifications':handle_connect/1. This issue affects postgrex: from 0.16.0 before 0.22.2, from pkg:github/elixir-ecto/postgrex@266b530faf9bde094e31e0e4ab851f933fadc0f5 before 0.22.2. |
|---|---|
| Publication Date | May 13, 2026, 12:16 a.m. |
| Registration Date | May 13, 2026, 4:12 a.m. |
| Last Update | May 14, 2026, 12:57 a.m. |