CVE-2026-116239: pgAdmin 4: An LDAP or Kerberos login is logged in to another account with the same username
In server mode pgAdmin 4 keeps an account per authentication source, so the same username can exist as, for example, an internal account and an LDAP account. After LDAP or Kerberos authenticated a user, pgAdmin chose the account to log in by username alone, or took the account Flask-Security's login form had looked up, without checking that it came from the source that authenticated the user. The session therefore belonged to another account, with its role, its servers and its saved database passwords:
- An LDAP or Kerberos user whose username matched an internal account was logged in as that internal account, including the administrator account created when pgAdmin is first set up. - With internal authentication listed before LDAP or Kerberos in AUTHENTICATIONSOURCES, the login form's internal validation looks up the account whose email was typed and keeps it even though its password does not match. A Kerberos user could type another Kerberos user's principal and be logged in as that user, and an LDAP user could do the same with an LDAP account whose email is their username.
Exploitation requires valid credentials for an LDAP directory or Kerberos realm that pgAdmin is configured to use.
The fix looks the account up by the authenticated username and the source that authenticated it, and no longer uses the account the login form found for any source but internal authentication. Internal authentication logs in that account only if it is an internal account. Desktop mode is not affected.
This issue affects pgAdmin 4: before 9.19.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.19
Event History
Frequently Asked Questions
Which deployments are exposed?
The issue affects pgAdmin 4 running in server mode with LDAP or Kerberos authentication configured. Exposure exists where the same username is present across authentication sources, such as an LDAP or Kerberos identity matching an internal pgAdmin account.
What does an attacker need to exploit this?
An attacker needs valid credentials for an LDAP directory or Kerberos realm configured in pgAdmin. No user interaction is required, but exploitation depends on account-name or email matching and, in some cases, the order of AUTHENTICATION_SOURCES.
What access could result from successful exploitation?
The attacker can receive another account's pgAdmin session, including that account's role, registered servers, and saved database passwords. A matching LDAP or Kerberos username can result in access to the internal account created during initial pgAdmin setup, including its administrator privileges.
How can administrators identify risky configurations?
Review server-mode installations using LDAP or Kerberos for duplicate usernames between those sources and internal pgAdmin accounts. Also review configurations where internal authentication appears before LDAP or Kerberos in AUTHENTICATION_SOURCES, as this can enable cross-user login behavior through the login form.