MEDIUM 4.3

CVE-2026-12049: pgAdmin 4 Open Redirect in MFA Flow

pgAdmin 4 contains an open redirect flaw in its multi-factor authentication (MFA) flow. When a user completes MFA validation or registration, the application accepts a 'next' parameter—meant to redirect users back to their intended destination—without verifying that the target is actually part of pgAdmin. An attacker can craft a malicious link that redirects an authenticated user to an external website after they complete MFA, making the redirect appear to originate from the trusted pgAdmin domain. This is primarily a phishing amplification risk: the attacker doesn't gain access to pgAdmin or databases, but leverages pgAdmin's legitimate domain to increase the credibility of follow-on credential theft attempts.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Weaknesses (CWE)
CWE-601
Affected products
1 configuration(s)
Published / Modified
2026-06-19 / 2026-06-29

NVD description (verbatim)

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.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in pgAdmin 4's MFA validate and register endpoints, which consume an unauthenticated user-supplied 'next' query or form parameter and redirect to its value without origin validation. The flaw allows absolute URLs with external hosts, protocol-relative URLs, and data/javascript schemes to pass through. The fix implements a same-origin redirect validator (_is_safe_redirect_url) that permits only relative paths and absolute http/https URLs whose hostname matches the current request host. The helper explicitly rejects external hostnames, protocol-relative references, non-http schemes, userinfo-based tricks (e.g., http://[email protected]/), and backslash normalization bypasses. Failed validation falls back to the internal browser index. Regression tests cover both accept and reject categories and the original proof-of-concept.

Business impact

The risk is primarily reputational and social-engineering amplification. Because the redirect flows through pgAdmin's trusted domain, phishing attacks gain legitimacy—victims see pgAdmin's URL in their browser before being redirected, lowering their guard. For organizations relying on pgAdmin for database administration, this increases the likelihood that MFA-completing users will surrender credentials to follow-on phishing campaigns. There is no direct data breach or unauthorized database access from the redirect itself; impact depends on successful credential harvesting after the redirect.

Affected systems

pgAdmin 4 versions 6.0 through 9.15 (inclusive) are vulnerable. The fix is available in version 9.16 and later. pgAdmin 5.x and earlier versions, as well as pgAdmin 3.x, fall outside the stated affected range and do not require patching for this issue.

Exploitability

Exploitation requires user interaction—the victim must click an attacker-supplied link while authenticated to pgAdmin, typically delivered via phishing email or chat. No special network position, elevated privilege, or complex technical steps are required; the attack surface is the MFA flow itself, which is public-facing. The CVSS 3.1 base score of 4.3 (Medium) reflects the requirement for user interaction and limited direct impact (integrity only, no confidentiality or availability loss from the redirect itself). Post-redirect phishing success depends on social engineering sophistication.

Remediation

Upgrade pgAdmin 4 to version 9.16 or later. The patch is backward-compatible and introduces no breaking changes to the MFA user experience. Organizations should prioritize this update for any pgAdmin instance accessible from untrusted networks or used by phishing-vulnerable staff. Temporary mitigation without patching is limited; restricting access to pgAdmin to a VPN or IP allowlist reduces phishing link viability but does not eliminate the redirect itself.

Patch guidance

Apply pgAdmin 4 version 9.16 or later. Verify the upgrade via the pgAdmin About or Settings panel (typically shows version number). No database migration or configuration changes are required. Test MFA flow after patching to confirm redirect behavior returns users to the pgAdmin UI rather than external sites. If running pgAdmin in a container, ensure base images are updated and redeployed.

Detection guidance

Monitor pgAdmin logs for MFA validation/registration requests containing 'next' parameters with external hostnames or non-http schemes. Web application firewalls (WAF) can detect and block requests to the /mfa/validate and /mfa/register endpoints if the 'next' parameter contains external domains. Endpoint Detection and Response (EDR) tools may flag user sessions that complete MFA and immediately connect to suspicious external hosts. Search historical logs for patterns: /mfa/validate?next=http(s)://<external-domain> or /mfa/register?next=javascript: to identify past exploitation attempts.

Why prioritize this

Although the CVSS score is Medium (4.3), this vulnerability deserves prompt attention because it directly enables phishing campaigns against authenticated administrative users. pgAdmin is often a critical database access point; compromised credentials could lead to lateral movement, data exfiltration, or production disruption. The fix is low-risk and widely available. Organizations with pgAdmin exposed to the internet or used by staff in high-phishing environments should patch within 30 days.

Risk score, explained

The CVSS 3.1 base score of 4.3 reflects: (1) network-accessible attack vector; (2) low attack complexity (simple URL crafting); (3) no privilege required; (4) required user interaction (clicking a malicious link); (5) limited scope (integrity only—user is redirected, not a system compromise); (6) no confidentiality or availability impact from the redirect itself. The score does not account for downstream phishing success, which is context-dependent and outside the vulnerability's direct scope. In practice, risk may be higher for organizations with high-value targets or poor phishing awareness.

Frequently asked questions

Can an attacker steal my pgAdmin password or database credentials through this redirect alone?

No. The redirect does not expose pgAdmin or database credentials. However, it increases the credibility of follow-on phishing attacks by laundering the redirect through pgAdmin's domain, making victims more likely to enter credentials on a fake login page presented after the redirect.

Do I need to reset user passwords or change database credentials after this vulnerability?

Not unless you have evidence that phishing campaigns exploiting this redirect succeeded and credentials were actually harvested. Patching closes the vulnerability. If you suspect credential compromise, follow your incident response plan: reset pgAdmin user passwords and database credentials, review access logs for unauthorized queries, and investigate user sessions around the time of suspected phishing.

What if my pgAdmin instance is only accessible via VPN or private network?

The vulnerability still exists and should be patched. VPN access reduces the likelihood of phishing link delivery, but does not prevent users who are already authenticated from being redirected to external sites if they click a malicious link shared by a trusted colleague or in internal communication channels.

Does this vulnerability affect pgAdmin 5.x or earlier versions?

No. The vulnerability disclosure specifies pgAdmin 4 versions 6.0 through 9.15. pgAdmin 5.x and earlier are not listed as affected and do not require patching for this issue.

This analysis is based on the CVE record and vendor advisory published as of 2026-06-29. Patch version numbers and affected ranges reflect the official disclosure; verify compatibility with your environment before deploying updates. This vulnerability requires user interaction and does not directly grant unauthorized system access. Risk is amplified in phishing-prone environments. Consult pgAdmin's official security advisory and your organization's vulnerability management policy for patch prioritization. SEC.co makes no warranty regarding the completeness or real-time accuracy of this analysis. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).