Pgadmin: users authenticated simultaneously via ldap may be attached to the wrong session
Description
A vulnerability was found in pgadmin. Users logging into pgAdmin running in server mode using LDAP authentication may be attached to another user's session if multiple connection attempts occur simultaneously.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
pgAdmin server mode LDAP authentication concurrently binds a user to an already-authenticated session, enabling session hijacking.
Root
Cause
The vulnerability arises from a race condition in pgAdmin's session handling when LDAP authentication is used in server mode. When multiple users attempt to authenticate simultaneously, the back-end may incorrectly associate a new session with an existing, authenticated session from another user [1][3].
Attack
Vector
The attacker requires network access to a pgAdmin server instance that has LDAP authentication enabled and is running in server mode. No prior authentication is needed, as the flaw manifests during the login process itself. Successful exploitation depends on the timing of concurrent authentication requests [2][3].
Impact
An unauthenticated attacker who triggers a login attempt at the same time as a legitimate user can be bound to that user's active session. This grants the attacker the same privileges and access as the victim, effectively bypassing authentication and allowing unauthorized actions within the pgAdmin interface [1][2].
Mitigation
As of the publication date (2025-01-09), Red Hat's advisory and the NVD entry indicate that the vulnerability has been acknowledged. Users should upgrade to a patched version of pgAdmin to eliminate the race condition. No workaround is mentioned in the provided references [1][2].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pgadmin4PyPI | < 7.0 | 7.0 |
Affected products
18- Range: < 7.0
- ghsa-coords16 versionspkg:pypi/pgadmin4pkg:rpm/suse/pgadmin4&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-ESPOSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP6pkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP5-LTSSpkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4pkg:rpm/suse/pgadmin4&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP5pkg:rpm/suse/pgadmin4&distro=SUSE%20Manager%20Proxy%204.3pkg:rpm/suse/pgadmin4&distro=SUSE%20Manager%20Server%204.3
< 7.0+ 15 more
- (no CPE)range: < 7.0
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
- (no CPE)range: < 4.30-150300.3.18.1
Patches
1fa29ba916326Fixed the LDAP authentication issue for the simultaneous login attempts.
1 file changed · +22 −0
web/pgadmin/authenticate/__init__.py+22 −0 modified@@ -12,6 +12,7 @@ import config import copy import functools +from threading import Lock from flask import current_app, flash, Response, request, url_for, \ session, redirect, render_template @@ -35,6 +36,19 @@ _URL_WITH_NEXT_PARAM = "{0}?next={1}" +class AuthLocker: + """Implementing lock while authentication.""" + lock = Lock() + + def __enter__(self): + self.lock.acquire() + return self + + def __exit__(self, type, value, traceback): + if self.lock.locked(): + self.lock.release() + + def get_logout_url() -> str: """ Returns the logout url based on the current authentication method. @@ -83,6 +97,14 @@ def login(): Entry point for all the authentication sources. The user input will be validated and authenticated. """ + with AuthLocker(): + return _login() + + +def _login(): + """ + Internal authentication process locked by a mutex. + """ form = _security.forms.get('login_form').cls(request.form) if OAUTH2 in config.AUTHENTICATION_SOURCES \ and 'oauth2_button' in request.form:
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-7w6r-748w-mh52ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-1907ghsaADVISORY
- access.redhat.com/security/cve/CVE-2023-1907ghsavdb-entryx_refsource_REDHATWEB
- bugzilla.redhat.com/show_bug.cgighsaissue-trackingx_refsource_REDHATWEB
- github.com/pgadmin-org/pgadmin4/blob/a9974b418c49760d3989b7fb25e052ff16b89ac6/docs/en_US/release_notes_7_0.rstghsaWEB
- github.com/pgadmin-org/pgadmin4/commit/fa29ba91632634d961f937ce3ed2c3b5a9d78f59ghsaWEB
- github.com/pgadmin-org/pgadmin4/issues/6100ghsaWEB
News mentions
0No linked articles in our index yet.