CVE-2023-1907
Executive Summary
CVE-2023-1907 is a high-severity session management vulnerability (CVSS 8.0) affecting pgAdmin 4 when deployed in server mode with LDAP authentication enabled. The flaw allows a user authenticating successfully via LDAP to be attached to another user's active session if multiple connection attempts occur concurrently. This session misattribution can lead to unauthorized access to another user's pgAdmin workspace, including their saved connection credentials, database objects, and query history. The vulnerability is exploitable over the network with low complexity, requires only low-privilege credentials (LDAP user account), and has no patch available from the vendor at this time.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
pgAdmin 4 is a widely deployed open-source administration and management platform for PostgreSQL. When running in server mode (as opposed to desktop mode), it handles multiple concurrent user sessions, typically authenticated through internal password storage, OAuth, or LDAP directory services.
The vulnerability stems from a race condition in the LDAP authentication session-assignment logic. When two or more LDAP authentication requests are processed nearly simultaneously from different user accounts, the server fails to correctly associate the newly created session objects with the originating users. The result is that User A's session token may be bound to User B's authenticated credentials, or the session objects may be swapped, causing User A to effectively operate within User B's session context.
This is a session-fixation/misattribution flaw in the authentication handler rather than an authentication-bypass vulnerability per se — the LDAP bind succeeds and credentials are validated correctly, but the session-to-user binding step is not thread-safe. The race window is narrow (milliseconds), but the impact is severe: the victim's entire pgAdmin panel, including saved server registry entries, connection strings, stored passwords, and any open query tabs, becomes visible and modifiable by the authenticated attacker.
Attack surface: any pgAdmin 4 instance running in server mode behind a reachable web interface with LDAP authentication enabled. The attack requires the attacker to have valid LDAP credentials (a low-privilege prerequisite, hence the CVSS Privileges Required: Low component), and the target instance must process concurrent authentication requests.
No specific code-level details, function names, or file paths are disclosed in the NVD description. The technical mechanism is inferred from the vulnerability class (session race condition) and the CNA title describing the exact failure mode: "users authenticated simultaneously via ldap may be attached to the wrong session."
Exploitation Scenarios
Attack chain for CVE-2023-1907, derived strictly from the NVD description and vulnerability class:
Step 1 — Reconnaissance / target identification. The attacker identifies public-facing pgAdmin 4 instances. This can be done via Shodan searches for pgAdmin login pages, or via HTTP fingerprinting of the login page title (e.g., "pgAdmin 4"). The attacker also requires valid LDAP credentials — either a legitimate low-privilege user account, a compromised account, or a shared/service account with access to the LDAP directory.
Step 2 — Triggering the race condition. The attacker needs to cause multiple, near-simultaneous LDAP authentication requests. The most direct approach is to script concurrent login attempts from two or more accounts against the pgAdmin login endpoint. The attacker submits their own credentials while a victim (or another account) submits theirs within the same narrow time window. Because the session-binding logic is not concurrency-safe, the server cross-assigns the session objects.
Step 3 — Payload/execution at the vulnerability-class level. No payload is required — this is a race condition on session assignment, not an injection flaw. The "payload" is simply the timing of concurrent authentication requests. The attacker may use a script that fires both login requests simultaneously (e.g., HTTP multiplexing, parallel threads, or botnet coordination). The success rate depends on the speed of the LDAP server and the exact duration of the session-creation window on the target pgAdmin instance.
Step 4 — Post-exploitation impact. Once the attacker has been bound to the victim's session, they inherit the victim's permissions and view. They can access the victim's saved database connection profiles (including stored credentials), browse and modify database schemas, execute arbitrary SQL queries as the victim, and exfiltrate sensitive data. If the victim is an administrator, the attacker gains admin-level control over the pgAdmin instance and all managed PostgreSQL databases. The session persists until logout or session timeout, and the activity is attributed to the victim's account in audit logs, obstructing attribution.
No public PoC is available for this CVE; the attack chain above is inferred from the vulnerability class (session race condition) and the NVD description of the failure mode.
Impact Assessment
Business impact: This vulnerability enables horizontal privilege escalation between LDAP-authenticated users of a pgAdmin server. The direct consequence is unauthorized access to another user's pgAdmin workspace, which may contain:
- Saved PostgreSQL connection parameters (hostnames, ports, database names)
- Stored credentials for database connections
- Query history containing potentially sensitive SQL and data
- Ability to execute queries and modifications against databases the victim could access
CVSS considerations: The 8.0 score reflects high confidentiality (C:H) and integrity (I:H) impacts with no availability impact (A:N). The attack vector is network (AV:N), low complexity (AC:L), and requires only low-privilege LDAP credentials (PR:L). No user interaction is needed (UI:N). The scope is unchanged (S:U) — the compromise is contained within the pgAdmin application's session infrastructure.
Blast radius: In enterprise deployments where pgAdmin is used as a central database administration panel, the blast radius extends to every PostgreSQL database managed through the instance. If a database administrator's session is hijacked via this race condition, the attacker gains the same level of access as that DBA — potentially across multiple production, staging, and development databases. Shared LDAP directories with many pgAdmin users amplify the exposure.
Affected systems: All pgAdmin 4 installations running in server mode with LDAP authentication. Desktop-mode installations (where authentication is local) are not affected. The vendor has not published the exact affected version range; the CVE lists the affected versions as empty, indicating insufficient vendor disclosure.
Confidence in impact assessment: High for the vulnerability class; medium for CVE-specific exploitation probability given the narrow race window and the 0.00447 EPSS score (36.9% percentile, indicating low observed exploitation activity to date). The EPSS score suggests low, but nonzero, real-world exploitation.
Detection Guidance
Sigma Rule
title: pgAdmin LDAP Session Race Condition - Concurrent Authentication Attempts
id: 4f8a1c2e-9b3d-4e5f-8a1b-2c3d4e5f6a7b
status: experimental
description: Detects rapid successive LDAP authentication requests to pgAdmin server mode, potentially exploiting the CVE-2023-1907 session race condition.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-1907
tags:
- attack.initial_access
- attack.t1190
author: Valtersit Threat Intelligence
date: 2025/01/30
logsource:
category: application
product: pgAdmin
detection:
selection:
EventID: 1 # pgAdmin auth event ID
AuthType: LDAP
Status: success
timeframe: 2s
condition: selection | count() by ClientIP > 2
level: medium
YARA Rule
rule CVE_2023_1907_pgAdmin_LDAP_Session_Race
{
meta:
author = "Valtersit Threat Intelligence"
description = "Detects pgAdmin server logs or response patterns indicating LDAP session misattribution"
cve = "CVE-2023-1907"
date = "2025-01-30"
severity = "high"
strings:
$s1 = "LDAP authentication successful" ascii wide nocase
$s2 = "session attached" ascii wide nocase
$s3 = "pgAdmin" ascii wide nocase
$s4 = "server mode" ascii wide nocase
$s5 = "security" ascii wide nocase
condition:
3 of them
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (msg:"CVE-2023-1907 pgAdmin LDAP Session Race Condition - Concurrent Login Attempts"; flow:to_server,established; content:"POST"; http_method; content:"login"; http_uri; content:"pgAdmin"; http_uri; threshold:type both, track by_src, count 3, seconds 2; metadata:cve CVE-2023-1907, author Valtersit; sid:1001907; rev:1;)
Elastic Detection
sequence by host.name, source.ip with maxspan=2s
[ authentication where event.action == "login" and process.name == "pgAdmin" and authentication.type == "ldap" and authentication.outcome == "success" ]
[ authentication where event.action == "login" and process.name == "pgAdmin" and authentication.type == "ldap" and authentication.outcome == "success" ]
Splunk SPL Query
index=pgadmin sourcetype="pgadmin:server:auth"
| where match(auth_type, "ldap") AND auth_status="success"
| transaction clientip maxspan=2s endswith="auth_status=success"
| where eventcount >= 2
| table _time, clientip, user, eventcount
| sort -_time
Wazuh OSSEC Rule
<group name="pgadmin,">
<rule id="227841" level="10">
<decoded_as>json</decoded_as>
<field name="app">pgAdmin</field>
<field name="event_type">login</field>
<field name="auth_method">ldap</field>
<field name="auth_result">success</field>
<description>CVE-2023-1907: Multiple concurrent LDAP auth successes from same source IP (session race condition)</description>
<group>authentication_success,attack,</group>
<options>no_full_log</options>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 — NO PATCH AVAILABLE. The vendor (pgAdmin project) has not released a fix for CVE-2023-1907 as tracked by available sources. NVD lists no affected versions and no vendor fix. Do not rely on a patch — assume vulnerable deployments remain exposed.
Immediate mitigations (implement today):
- Disable or restrict LDAP authentication — If possible, switch pgAdmin to local/internal authentication or to an alternative SSO method (e.g., OAuth) until a patch is available. If LDAP is mandatory, restrict access to the pgAdmin login page to trusted IP ranges via firewall rules.
- Enforce rate limiting on the login endpoint — Configure a reverse proxy or WAF in front of pgAdmin to limit concurrent authentication requests per source IP (e.g., maximum 1 login request per 2–3 seconds per client). This narrows the race window significantly.
- Require MFA — If the organization uses MFA on top of LDAP auth, require it for pgAdmin access. Even if a session is misattributed, the attacker would need to pass the victim's MFA challenge to maintain the hijacked session — though this is not a complete mitigation since the session is already bound.
- Restrict pgAdmin server mode — Where feasible, run pgAdmin in desktop mode for individual administrators rather than server mode for teams, eliminating the multi-user session pool entirely.
- Monitor authentication logs — Enable detailed auth logging on pgAdmin and forward to SIEM for anomaly detection (multiple rapid LDAP successes from one source).
Patch/upgrade steps:
- Check the pgAdmin project release page (https://www.pgadmin.org/download/) for a patched release. As of the data collection date, no patched version has been announced for CVE-2023-1907. Subscribe to the pgAdmin security announcements and pgAdmin-hackers mailing list.
- When a fix is released, upgrade all pgAdmin server-mode instances to the patched version. Test in a staging environment first.
Long-term hardening:
- Network segmentation — Place pgAdmin in an internal network segment accessible only via VPN or jump-server, not directly exposed to the internet.
- Application-level access controls — Use a WAF with bot-detection to block automated login tools that could be used to time the race-condition requests.
- Vulnerability management — Track CVE-2023-1907 in your vulnerability scanner until a patch is applied. Re-run detection scans after each pgAdmin release to confirm patching.
- Session timeout reduction — Reduce the pgAdmin session timeout to minimize the window during which a misattributed session remains valid.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2023-1907 — Official NVD record, CVSS 8.0, EPSS 0.00447.
- pgAdmin Project Page: https://www.pgadmin.org/ — Vendor website; monitor for security announcements and patch releases.
- pgAdmin Security Advisories (Mailing List): https://www.pgadmin.org/support/ — Subscribe for future security advisories related to CVE-2023-1907.
- ATT&CK T1190 — Exploit Public-Facing Application: https://attack.mitre.org/techniques/T1190/ — Mapping of the attack vector.
- CWE-384 — Session Fixation: https://cwe.mitre.org/data/definitions/384.html — Related weakness class.
Exploit-in-the-wild evidence: None reported. CISA KEV does not list this CVE. EPSS score of 0.00447 (36.9% percentile) indicates low observed exploitation activity. No threat actor campaigns have been publicly attributed to this vulnerability as of the reporting date.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.