製品・ソフトウェアに関する情報
pgAdmin ProjectのpgAdmin 4におけるSQL インジェクションの脆弱性
Title pgAdmin ProjectのpgAdmin 4におけるSQL インジェクションの脆弱性
Summary

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未満に影響します。

Possible impacts ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
Solution

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

Publication Date June 19, 2026, midnight
Registration Date June 30, 2026, 11:23 a.m.
Last Update June 30, 2026, 11:23 a.m.
CVSS3.0 : 重要
Score 8.8
Vector CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected System
pgAdmin Project
pgAdmin 4 1.0 以上 9.16 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年06月30日]
  掲載
June 30, 2026, 11:23 a.m.

NVD Vulnerability Information
CVE-2026-12050
Summary

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.

Publication Date June 19, 2026, 9:16 a.m.
Registration Date June 27, 2026, 4:04 a.m.
Last Update June 23, 2026, 5:23 a.m.
Related information, measures and tools
Common Vulnerabilities List