新着 / 2026年11月26日 / CVE-2026-136500
psqlODBCでSQLインジェクションの問題(文字コード処理)
掲載
何が問題か
psqlODBCは、クライアント文字コードの別名(WIN950、Windows950、big-5など)や一部の文字コード(JOHAB、EUC_TW、EUC_CN、EUC_KR)でマルチバイト文字の境界を正しく判定できず、エスケープ処理が不完全になる問題があります。これにより、引用符の扱いがずれてリテラルが途中で終わる可能性があります。対象はUTF-8以外の接続で、ANSIドライバーまたはANSIエントリポイントを使い、特定の文字コードを指定している場合です。
悪用されると
バインドパラメータやSQLTables()などのカタログ関数に渡される名前をエンドユーザーが制御できる場合、アプリケーションのデータベースロールの権限でSQLが実行される可能性があります。CVSS v3.1基本値は8.1(HIGH)で、攻撃条件の複雑さは高とされています。悪用の有無は公表されていません。
取るべき対応
影響版はpsqlODBC 18.00.0006以前とされています。修正版の番号は公表されていないため、ベンダーの最新情報を確認してください。当面はUTF-8での接続への変更や、対象の文字コード指定を避ける運用を検討してください。
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-173 |
| CVE公開日 | 2026-11-25 |
出典
- NVD: CVE-2026-136500
- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-2rjm-67gc-54r4
- https://odbc.postgresql.org/changelog/
公式の説明(英語の原文)
To escape a bound parameter, or a name passed to a catalog function, psqlODBC has to know where each multibyte character of the client encoding ends. It treated a client encoding named by an alias the server accepts, such as WIN950, Windows950 or big-5 for BIG5, as single-byte, and it accepted too narrow a range of lead bytes for JOHAB, EUC_TW, EUC_CN and EUC_KR. A quote byte that the server reads as part of such a character was then not doubled, or a quote the server reads on its own was taken for part of a character, and the literal ended early. An end user who controls one bound character parameter, or a name the application passes to a catalog function such as SQLTables(), can run SQL with the rights of the application's database role. This requires a connection that is not in UTF-8: the ANSI driver, or the ANSI entry points, with one of these client encodings. For bound parameters the driver must also be substituting parameters itself, as it does with UseServerSidePrepare=0 or a cursor type other than forward-only. Versions up to and including psqlODBC 18.00.0006 are affected.