新着 / 2026年11月26日 / CVE-2026-136512
psqlODBC(PostgreSQL用ODBCドライバ)のバッファ境界外書き込みの脆弱性
掲載
何が問題か
SQL_C_DEFAULTを使用した際、列やパラメータのC型がSQL型に従う仕様の中で、アプリケーションが宣言時に想定した型より大きい型のデータが書き込まれ、確保済みバッファを超える書き込みが起きる問題です。uuid列の取得や複数行フェッチ、int8・int2vector列の変換、NULLバッファへの出力パラメータ、SQLGetData()のBufferLength 0指定、静的更新可能カーソルでのSQLBulkOperations後の処理などでも境界外書き込みやヒープ破損が生じるとされています。
悪用されると
接続先サーバーの悪意ある振る舞い、またはsslmode=verify-fullを使っていない接続の経路上にいる第三者、対象テーブルの所有者により誘発される可能性があり、影響としてメモリ破壊によるアプリケーションの異常終了や、公表されていない範囲での任意コード実行につながるおそれがあります。悪用の有無は公表されていません。
取るべき対応
本脆弱性はpsqlODBC 18.00.0006以前が影響を受けるとされています。修正版の番号はJSONに記載がないため公表されていません。ベンダーの公式情報で修正版を確認して更新し、接続でsslmode=verify-fullの利用を検討してください。
AIが出典から要約し、数値を機械照合しています。
更新履歴
初回掲載。
指標
| 深刻度(CVSS v3.1) | 重要 7.5CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
|---|---|
| 実際の攻撃での悪用 | CISA KEVには未掲載 |
| 問題の種類 | CWE-787 |
| CVE公開日 | 2026-11-25 |
出典
- NVD: CVE-2026-136512
- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-c66p-8p63-p7mr
- https://odbc.postgresql.org/changelog/
公式の説明(英語の原文)
With SQL_C_DEFAULT, the C type of a bound column or parameter follows its SQL type. An application sizes its buffer from the type it was told when it described the statement. When the column had another type at fetch time, because the server reported another type, the table was altered, or an output parameter's result column had another type, psqlODBC wrote the larger type into the smaller buffer: 12 bytes past a 4-byte buffer for a uuid, and more in multi-row fetches, where the driver also steps through the array by the larger size. Other conversions wrote past the application's buffer as well: - With Int8As set to a smaller type, an int8 column fetched as SQL_C_DEFAULT was still written as 8 bytes. - An int2vector column fetched as SQL_C_DEFAULT returned unterminated binary data instead of text. - An output parameter that the application discards by binding a NULL buffer overflowed a stack buffer in the driver. - SQLGetData() with BufferLength 0 on a column the driver reads as a large object wrote a NUL byte past the buffer. - Adding a row with SQLBulkOperations(SQL_ADD) on a static updatable cursor before the first fetch, then changing that row, rolling back and fetching it, made the keyset index arithmetic free a pointer that was never allocated and corrupt the heap. This can be triggered by a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable), and by the owner of a table the application reads. Versions up to and including psqlODBC 18.00.0006 are affected.