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

pgAdmin 4のインポート/エクスポートクエリのエクスポート機能におけるOSコマンドインジェクション(CWE-78)の脆弱性です。ユーザーが提供した入力が適切にサニタイズされず、psqlの\copyメタコマンドテンプレートに直接挿入されていました。認証されたユーザーは") TO PROGRAM 'cmd'"を注入して\copy (...)の文脈を逸脱し、pgAdminサーバー上で任意のコマンドを実行可能であり、また") TO '/path'"を使って任意のファイルを書き込むことも可能でした。さらに、追加のフィールド(format、on_error、log_verbosity)も同様に生のまま挿入されており、悪用が可能でした。修正では、psqlのstrtokxトークナイザーを基にした括弧バランス解析パーサを追加し、format/on_error/log_verbosityの許可リストを設け、クエリ内のヌルバイトを拒否し、型およびチェック機構を強化しています。この問題はpgAdmin 4のバージョン9.15未満に影響を及ぼします。

Possible impacts 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
Solution

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date May 11, 2026, midnight
Registration Date May 28, 2026, 2:38 p.m.
Last Update May 28, 2026, 2:38 p.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 9.4 以上 9.15 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2026年05月28日]
  掲載
May 28, 2026, 2:38 p.m.

NVD Vulnerability Information
CVE-2026-7816
Summary

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export.

User-supplied input was interpolated directly into a psql \copy metacommand template without sanitization. An authenticated user could inject ") TO PROGRAM 'cmd'" to break out of the \copy (...) context and achieve arbitrary command execution on the pgAdmin server, or ") TO '/path'" for arbitrary file write. Additional fields (format, on_error, log_verbosity) were also raw-interpolated and exploitable.

Fix adds a parens-balance parser modeled on psql's strtokx tokenizer, allow-lists format/on_error/log_verbosity, rejects null bytes in the query, and tightens type and gating checks.

This issue affects pgAdmin 4: before 9.15.

Publication Date May 12, 2026, 1:17 a.m.
Registration Date May 12, 2026, 4:14 a.m.
Last Update May 14, 2026, 12:34 a.m.
Related information, measures and tools
Common Vulnerabilities List