pgAdmin ProjectのpgAdmin 4におけるSQL インジェクションの脆弱性
タイトル pgAdmin ProjectのpgAdmin 4におけるSQL インジェクションの脆弱性
概要

pgAdmin 4 の名前付きリストアポイントエンドポイント(POST /browser/server/restore_point/{gid}/{sid})におけるSQLインジェクションの脆弱性について説明します。ユーザーから提供された 'value' フィールドがバインドパラメータとして渡されるのではなく、str.format() を用いて直接SQL文字列に挿入されていたため、認証済みのpgAdminユーザーが接続されたPostgreSQLセッションを介して追加のステートメントをこのエンドポイントを通じて注入できてしまいます。注入されたSQLはユーザーが既に認証済みのデータベースロールで実行されます。この欠陥は権限の境界を越えるものではなく、ユーザーは既にQuery Toolを通じて該当ロールに直接SQLアクセス権を持っているため、攻撃者はそのロールの権限の範囲を超えた機能を得ることはできません。この影響は限定的であり、インジェクション経路が公式のSQL実行インターフェースではないことにも起因します。そのため、アプリケーション層でQuery Toolを制限しているデプロイ環境では、予期せぬ経路でSQLが実行される可能性があります。修正内容としては、リストアポイント名をバインドパラメータとして渡し、関数呼び出しをpg_catalog.pg_create_restore_pointとしてスキーマ修飾し、非デフォルトのsearch_pathが接続上で呼び出しに影響しないようにしました。リグレッションテストでは、値がSQL文字列に直接埋め込まれるのではなくバインドパラメータとして正しく処理されることを確認しています。本問題はpgAdmin 4のバージョン1.0から9.16未満に影響します。

想定される影響 ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年6月19日0:00
登録日 2026年6月30日11:23
最終更新日 2026年6月30日11:23
CVSS3.0 : 重要
スコア 8.8
ベクター CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
pgAdmin Project
pgAdmin 4 1.0 以上 9.16 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年06月30日]
  掲載
2026年6月30日11:23

NVD脆弱性情報
CVE-2026-12050
概要

SQL injection in pgAdmin 4's named restore point endpoint (POST /browser/server/restore_point/{gid}/{sid}). The user-supplied 'value' field was interpolated directly into the SQL string with str.format() instead of being passed as a bound parameter, allowing an authenticated pgAdmin user with a connected PostgreSQL session to inject additional statements through that endpoint.

The injected SQL executes under the database role the user is already authenticated as. The defect does not cross a privilege boundary -- the user already has direct SQL access to that role through the Query Tool -- so the attacker gains no capability beyond what their database role already grants them. The marginal impact accounts for the fact that the injection path is not the documented SQL-execution interface, so a deployment that gates the Query Tool at the application layer could see SQL executed through a path it did not anticipate.

Fix passes the restore point name as a bound parameter and schema-qualifies the function call as pg_catalog.pg_create_restore_point so a non-default search_path on the connection cannot redirect the call to a shadow definition. A regression test asserts the value arrives as a bound parameter and not spliced into the SQL string.

This issue affects pgAdmin 4: from 1.0 before 9.16.

公表日 2026年6月19日9:16
登録日 2026年6月27日4:04
最終更新日 2026年6月23日5:23
関連情報、対策とツール
共通脆弱性一覧