脆弱性ウォッチ

新着 / 2026年11月26日 / CVE-2026-136506

psqlODBC:名前の未エスケープによるSQLインジェクション

重要 7.5

掲載

何が問題か

psqlODBCが、データベース名、スキーマ名、テーブル名、カラム名、カーソル名、パラメータ名などをエスケープや修飾せずにクエリへ組み込むため、SQLインジェクションの問題があると報告されています。SQLSetPos()とSQLBulkOperations()のSET句・INSERT列リストに使われるカラム名は、CVE-2026-120065向けの修正(18.00.0006)の対象外であり、18.00.0006でも影響を受けるとされています。

悪用されると

細工された名前を作成できるデータベースユーザー、またはアプリケーションに名前を入力できるエンドユーザーにより、アプリケーションのデータベースロールの権限でSQLが実行される可能性があります。悪用の有無は公表されていません。

取るべき対応

18.00.0006以前のpsqlODBCを利用している場合は、修正版への更新を検討してください。修正版の番号は公表されていません。あわせて、利用者が入力できる名前の扱いや、データベースロールの権限の見直しを行うことをお勧めします。

AIが出典から要約し、数値を機械照合しています。

更新履歴

  1. 初回掲載。

指標

深刻度(CVSS v3.1)重要 7.5
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
実際の攻撃での悪用CISA KEVには未掲載
問題の種類CWE-89、CWE-706
CVE公開日2026-11-25

出典

公式の説明(英語の原文)

psqlODBC builds queries of its own from names, and put these names into them without escaping or qualification: - the database name in SQLForeignKeys(); - the current schema name in catalog functions; - the table name in the currtid2() call that re-reads rows of updatable cursors; - column names in the inserts and updates of SQLSetPos() and SQLBulkOperations(); - cursor names set with SQLSetCursorName() or returned as refcursors (FetchRefcursors=1); - parameter names (SQL_DESC_NAME) in procedure calls; - the = operator in an OID comparison in SQLColumns(), which the server resolves through search_path. The column names of the fourth item are a variant of CVE-2026-120065 (GHSA-9cg8-r57h-h6jj). The fix for that advisory, in 18.00.0006, doubles " in the stored row-identifier name, which the keyset queries and the WHERE clause of the positioned statements use. The column names that SQLSetPos() and SQLBulkOperations() put into the SET list of their UPDATE and into the column list of their SQL_ADD INSERT come from the catalog and were not covered by it, so a driver patched to 18.00.0006 is still affected by this one. A database user who can create a database, schema, table, column or operator with a crafted name, or an end user who supplies a cursor or parameter name to the application, can run SQL with the rights of the application's database role. Versions up to and including psqlODBC 18.00.0006 are affected.