脆弱性ウォッチ

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

psqlODBC(PostgreSQL用ODBCドライバ)のメモリ解放・書き込み範囲の不具合

重要 7.5

掲載

何が問題か

psqlODBCのコミット・ロールバック後の後処理、通知コールバック、複数カーソルを持つ文の解放、UseDeclareFetch=1時のカーソル処理、SQLGetData()、SQLProcedureColumns()、SQLPutDataの失敗後の処理などで、使用中のメモリの解放、二重解放、バッファ範囲外への書き込みが起きることが報告されています。影響を受けるのは18.00.0006までのバージョンとされています。

悪用されると

既に解放されたメモリや範囲外のメモリへのアクセスにより、クラッシュやヒープ破損が起きることが示されています。コード実行は実証されていないと説明されています。攻撃者が接続先サーバを支配している場合や、sslmode=verify-fullを使用していない接続の経路上にいる場合に悪用され得るとされています。

取るべき対応

psqlODBCを18.00.0006より新しいバージョンへ更新することを検討してください。修正版の具体的な番号はJSONに記載がないため公表されていません。接続時にsslmode=verify-fullの使用を検討してください。

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

更新履歴

  1. 初回掲載。

指標

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

出典

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

psqlODBC frees memory that is still in use, frees it twice, or writes outside an application buffer in these cases: - The clean-up the driver runs at commit and rollback sends queries of its own, and the reply to one of them can start the clean-up again while it is running. The nested run frees the rollback log, or the list of cursors and prepared statements to close, and the outer run uses and frees it again. - The callback through which libpq delivers notices could run that clean-up, and close the connection, while libpq was still using the connection. - Freeing a statement whose result holds several cursors (FetchRefcursors=1, or UseDeclareFetch=1) used the freed first result while the later cursors were closed. - With UseDeclareFetch=1, after a rollback closed an updatable cursor, rows added or deleted through it were counted but not stored, so freeing the statement freed uninitialised pointers, and adding a row wrote past the keyset. - After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the buffer the application passed. - SQLProcedureColumns() freed the result of its catalog query twice when the query failed. - In a process named sqlservr (SQL Server linked servers), a server version below 8.4 made the statement parser free a buffer twice. - A failed SQLPutData in the middle of a SQLSetPos() or SQLBulkOperations() data-at-execution sequence left the whole operation pending, with the internal statement still allocated and autocommit silently off, so later statements were rolled back at disconnect. The next positioned update ran the stale callback against a statement that was never executed and dereferenced NULL. Most of these 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). A database user who can make a statement fail, or who controls the contents of a row the application reads, can trigger the UseDeclareFetch=1 and SQLGetData() cases against an honest server. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.