CVE-2026-12049: pgAdmin 4: Open redirect in multi-factor authentication flow via unvalidated 'next' parameter

Published Jun 18, 2026
·
Updated

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 issaferedirecturl 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.

Affected Software

2 affected components
pgAdmin pgAdmin 4>=6.0<9.16
pgAdmin Pgadmin 4 Postgresql>=6.0<9.16

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pgAdmin 4 to a version that resolves this vulnerability.

    Fixed in 9.16
  2. Configuration

    Update pgAdmin 4 so that the MFA validate and register endpoints do not directly honor user-supplied 'next'. Instead, route all 'next' values through the _is_safe_redirect_url helper; if rejected, redirect the user to the internal browser index.

    pgAdmin 4 MFA flow (/mfa/validate and /mfa/register) next parameter handling = Gated through same-origin _is_safe_redirect_url (allow only relative paths; and http(s) absolute URLs with host matching current request host; reject protocol-relative, non-http schemes (javascript:, data:, mailto:), userinfo tricks (e.g., http://localhost@attacker/), and backslash variants that normalize to forward slashes). Unsafe targets fall back to internal browser index

Event History

Jun 18, 2026
CVE Published
via MITRE·11:37 PM
Data Sourced
via MITRE·11:37 PM
DescriptionSeverityWeakness
Jun 19, 2026
Data Sourced
via NVD·12:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-12049?

The severity of CVE-2026-12049 is rated as medium with a score of 4.3.

2

How does CVE-2026-12049 impact pgAdmin 4?

CVE-2026-12049 allows an open redirect in the multi-factor authentication flow, where unvalidated 'next' parameters can lead users to external sites.

3

Who is affected by CVE-2026-12049?

Authenticated users of pgAdmin 4 who interact with the multi-factor authentication flow are affected by CVE-2026-12049.

4

How do I fix CVE-2026-12049?

To fix CVE-2026-12049, ensure that the 'next' parameter is validated to redirect only to internal pgAdmin URLs.

5

Is there a workaround for CVE-2026-12049?

Currently, the best workaround for CVE-2026-12049 is to avoid clicking on links that contain unvalidated 'next' parameters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203