| Title | pgAdmin ProjectのpgAdmin 4におけるオープンリダイレクトの脆弱性 |
|---|---|
| Summary | pgAdmin 4の多要素認証フローにおけるオープンリダイレクトの脆弱性について説明します。MFAの検証および登録エンドポイントは、ユーザーが指定した「next」クエリやフォームパラメータを、対象がpgAdmin内を指しているかどうかを確認せずに処理していました。そのため、認証済みの被害者がフィッシングによく使われる/mfa/validate?next=外部URLのようなリンクをクリックすると、信頼された認証フローから直接攻撃者が管理するホストにリダイレクトされてしまいます。この欠陥は信頼ドメインのリダイレクトに関するものであり、特権の回避ではありません。攻撃者はpgAdminや被害者のデータベースへの読み書きアクセス権を取得できませんが、このリダイレクトにより攻撃者の目的地がpgAdminのURLを経由して送られるため、被害者に対する資格情報フィッシングの成功率が高まります。修正では、same-originの_is_safe_redirect_urlヘルパーを導入し、ユーザー提供の「next」値を使用するすべてのMFAリダイレクトに対してこれを適用しました。このヘルパーは、相対パスおよびスキームがhttp(s)でホストが現在のリクエストホストと一致する絶対URLのみを許可し、絶対およびプロトコル相対形式の外部ホストや非httpスキーム(javascript:、data:、mailto:)、ユーザー情報を悪用する手法(http://localhost@attacker/)、および一部ブラウザがスラッシュに正規化するバックスラッシュの変種を拒否します。安全でないターゲットについては内部ブラウザのインデックスにフォールバックします。専用の回帰テストでは各受け入れカテゴリと拒否カテゴリ、および報告者によるPoCを検証しています。本問題はpgAdmin 4のバージョン6.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 | 6.1 |
|---|---|
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| pgAdmin Project |
| pgAdmin 4 6.0 以上 9.16 未満 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年06月30日] 掲載 |
June 30, 2026, 11:23 a.m. |
| Summary | Open redirect in pgAdmin 4's multi-factor authentication flow. The MFA validate and register endpoints honoured the user-supplied 'next' query/form parameter without confirming the target pointed back inside pgAdmin, so an authenticated victim who clicked /mfa/validate?next=<external> -- a link typically delivered by phishing -- would be sent to an attacker-controlled host directly out of the trusted auth flow. The defect is a trusted-domain redirect, not a privilege bypass: the attacker gains no read/write access to pgAdmin or the victim's database, but the redirect launders the attacker's destination through pgAdmin's URL, which raises the success rate of credential-phishing follow-on against the victim. Fix introduces a same-origin _is_safe_redirect_url helper and gates every MFA redirect that consumes user-supplied 'next' values through it. The helper allows only relative paths and absolute URLs whose scheme is http(s) and whose host matches the current request host; it rejects external hosts in absolute and protocol-relative form, non-http schemes (javascript:, data:, mailto:), userinfo tricks (http://localhost@attacker/), and backslash variants that some browsers normalize to forward slashes. Unsafe targets fall back to the internal browser index. A dedicated regression test exercises each accept/reject category and the original reporter PoC. This issue affects pgAdmin 4: from 6.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. |