新着 / 2026年11月26日 / CVE-2026-136515
psqlODBC(PostgreSQL用ODBCドライバ)のメモリ破損の脆弱性
掲載
何が問題か
psqlODBCは、キーセット駆動カーソルや ODBC エスケープを処理する際に、文字列中の位置情報を使ってSQL文を書き換えます。その位置情報が文の範囲外を指したり、別の文を指したりする不具合が複数報告されています。具体的には、SQLExecDirect()失敗後の文ハンドルへの誤った適用、負の長さのコピー、{fn …}エスケープの解析誤り、未初期化ポインタの参照、NULLポインタの参照、閉じられていない{fn …}による範囲外読み取りとスタック枯渇などが挙げられています。
悪用されると
キーセット駆動またはダイナミックカーソル(読み取り専用以外)で開かれる文、または出力パラメータを伴う呼び出しの文テキストを攻撃者が与えられる場合、アプリケーションのヒープが破損し、プロセスが終了する可能性があります。問い合わせツールやレポート作成ツールなど、利用者が入力したSQLを実行するアプリケーションが該当し得ます。コード実行は実証されていないと記載されています。
取るべき対応
psqlODBCを18.00.0006より新しいバージョンへ更新してください。修正版の番号は提供情報に記載がないため、公表されていません。利用者入力のSQLを実行するアプリケーションでは、更新までの間、信頼できない入力を直接渡さないよう運用面での確認を行ってください。
AIが出典から要約し、数値を機械照合しています。
更新履歴
初回掲載。
指標
| 深刻度(CVSS v3.1) | 重要 7.5CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
|---|---|
| 実際の攻撃での悪用 | CISA KEVには未掲載 |
| 問題の種類 | CWE-125、CWE-674、CWE-787 |
| CVE公開日 | 2026-11-25 |
出典
- NVD: CVE-2026-136515
- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-pw7w-x92p-r3q2
- https://odbc.postgresql.org/changelog/
公式の説明(英語の原文)
psqlODBC rewrites statement text for keyset-driven cursors and ODBC escapes using positions it found in the text. These positions could lie outside the text or describe another statement: - After SQLExecDirect() failed on a statement handle, the FROM and WHERE positions of the failed statement were applied to the next, shorter statement on that handle. - The parser could record a FROM position with no text after it, and the rewrite then copied a negative length. - An {fn …} escape whose arguments contain FOR UPDATE, ; or INTO … FROM made the driver remove a cursor prefix from the wrong buffer. - {fn CONVERT(?, …)} with an output parameter produced a negative argument length. - An unclosed {fn …} escape made the driver read past the statement, and a few thousand nested ones exhausted the stack. - Translating @@identity in long statement text read an uninitialised pointer, and {? = call …} with nothing bound for the return value dereferenced NULL. Whoever supplies the text of a statement that an application opens on a keyset-driven or dynamic cursor with a concurrency other than read-only, or calls with an output parameter, can corrupt the application's heap and end it. That includes the users of query tools, report builders and other applications that run SQL their users type. Code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.