新着 / 2026年11月26日 / CVE-2026-136502
psqlODBC(PostgreSQL用ODBCドライバ)におけるSQLインジェクションの脆弱性
掲載
何が問題か
psqlODBCは、文のテキストを解析してパラメータ置換やエスケープ変換、クエリの書き換えを行います。その解析がサーバーの解釈と異なる箇所があり、データとして扱うべき文字列がSQLとして実行される場合や、更新可能カーソルの書き込みが別のテーブルに向けられる場合があります。ConnSettingsの処理にも、セミコロンを含む値がSQLとして実行される問題が報告されています。対象は18.00.0006以前のバージョンです。
悪用されると
アプリケーションがエンドユーザーの入力を文に組み込む場合、そのユーザーがアプリケーションのデータベースロールの権限でSQLを実行できる可能性があります。また、細工した名前のテーブルを作成できるデータベースユーザーが、他のユーザーの書き込み先を変更できる可能性があります。悪用の有無は公表されていません。
取るべき対応
psqlODBCを18.00.0006より新しい修正版に更新してください。修正版の具体的な番号は公表されていません。
AIが出典から要約し、数値を機械照合しています。
更新履歴
初回掲載。
指標
| 深刻度(CVSS v3.1) | 重要 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
|---|---|
| 実際の攻撃での悪用 | CISA KEVには未掲載 |
| 問題の種類 | CWE-89、CWE-706 |
| CVE公開日 | 2026-11-25 |
出典
- NVD: CVE-2026-136502
- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4392-6j85-5q2q
- https://odbc.postgresql.org/changelog/
公式の説明(英語の原文)
psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table: - An escape string constant written e'…' in lower case was not recognised as one, and '…' after a keyword ending in E, as in LIKE'…', was taken for one. - A } inside a quoted literal ended an ODBC {d …}, {t …}, {ts …} or {escape …} sequence. - Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted. - A trailing -- comment in one statement of a batched parameter array swallowed the next statement. - Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor's own queries could include SQL from inside a literal. - A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table. - An integer parameter with an embedded NUL byte cut the query short. - /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens. - ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user's value into a SET command there ran the rest of the value as SQL at connect time. An end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application's database role. A database user who can create a table with a crafted name can redirect another user's positioned writes to a table of their choosing. Versions up to and including psqlODBC 18.00.0006 are affected.