| タイトル | pgAdmin ProjectのpgAdmin 4におけるオープンリダイレクトの脆弱性 |
|---|---|
| 概要 | 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未満に影響を与えています。 |
| 想定される影響 | ・当該ソフトウェアが扱う情報の一部が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う情報の一部が書き換えられる可能性があります。 ・当該ソフトウェアは停止しません。 |
| 対策 | リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年6月19日0:00 |
| 登録日 | 2026年6月30日11:23 |
| 最終更新日 | 2026年6月30日11:23 |
| CVSS3.0 : 警告 | |
| スコア | 6.1 |
|---|---|
| ベクター | 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 | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年06月30日] 掲載 |
2026年6月30日11:23 |
| 概要 | 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. |
|---|---|
| 公表日 | 2026年6月19日9:16 |
| 登録日 | 2026年6月27日4:04 |
| 最終更新日 | 2026年6月23日5:23 |