CVE-2026-86863
published critical CVSS 4.0 · 9.3pgAdmin 4: Authentication bypass via a client-controlled identity header in Webserver authentication mode
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pgadmin.org | — | pgAdmin 46.2 to < 9.18 · Other versions: unaffected | Affected | Not stated | PostgreSQL |
Description
pgAdmin 4's Webserver authentication source is intended to accept an identity asserted by the web server or reverse proxy in front of pgAdmin, delivered through the WSGI/CGI environment. WebserverAuthentication.get_user() read config.WEBSERVER_REMOTE_USER from request.environ and, when that returned nothing, fell back to reading the same name directly from the inbound HTTP request headers via request.headers.get(). An inbound HTTP header is written by whoever sends the request, so any client able to reach pgAdmin could supply that header itself and be authenticated as any username it named, including an existing Administrator, without presenting a password or any other credential. The environment lookup could also be satisfied by a client-supplied header whenever WEBSERVER_REMOTE_USER was configured to an HTTP_-prefixed or hyphenated name such as HTTP_X_FORWARDED_USER or X-Forwarded-User, since WSGI servers place inbound headers into the environment under exactly those names. Deployments are affected only when 'webserver' is enabled in AUTHENTICATION_SOURCES. The fix distinguishes a genuine CGI/WSGI variable from a header-derived one and implicitly trusts only the former. A header-asserted identity is now accepted only when the operator explicitly opts in via WEBSERVER_REMOTE_USER_FROM_HEADER, the request arrives from a peer listed in WEBSERVER_TRUSTED_PROXIES, and, when configured, a shared secret supplied in WEBSERVER_SHARED_SECRET_HEADER matches WEBSERVER_SHARED_SECRET under a constant-time comparison. The trusted-peer check deliberately reads the real socket peer address rather than request.remote_addr, because ProxyFix rewrites the latter from the client-controlled X-Forwarded-For header and would otherwise allow an attacker to claim to be the trusted proxy. As defence in depth, login() now refuses any account whose auth_source is not 'webserver', so a misconfigured trust gate cannot be used to assume an internal or LDAP account. This issue affects pgAdmin 4: from 6.2 before 9.18.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.3 / 10
- Severity
- critical
- Provider
- PostgreSQL · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Scenarios
- en: Same reasoning as the CVSS 3.1 entry: an unauthenticated attacker asserts an arbitrary identity, including Administrator, with one crafted request and no user interaction. VC:H/VI:H/VA:H because full control of the pgAdmin instance follows directly. SC:N/SI:N/SA:N because the impact is bounded by pgAdmin's own authority; any onward effect on database servers follows from credentials pgAdmin already held rather than from a distinct subsequent system being compromised by this flaw itself.
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 9.8 | critical | PostgreSQL · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | en: Threat model: any unauthenticated client able to reach the pgAdmin login endpoint in a deployment that has 'webserver' enabled in AUTHENTICATION_SOURCES. The attack is a single HTTP request carrying an additional header, so Attack Complexity is Low, Privileges Required is None, and no victim interaction is involved. Confidentiality, Integrity and Availability are all High because the attacker may name an existing Administrator and thereby obtain full control of the pgAdmin installation, including every server definition and stored credential it holds. Scope is Unchanged: although the attacker impersonates another principal, everything compromised is governed by pgAdmin's own security authority. The configuration precondition (Webserver authentication enabled) is a deployment property rather than an attacker-facing barrier, so it is not modelled as Attack Complexity; the score describes the vulnerable configuration. |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pgadmin.org | pgAdmin 4 | 6.2 to < 9.18 (affected · custom)Default: unaffected | PostgreSQL · cna |
Weaknesses
2- CWE-290 CWE-290 Authentication Bypass by Spoofing
- CWE-807 CWE-807 Reliance on Untrusted Inputs in a Security Decision
References
1Provider assertions
2PostgreSQL · cna
pgAdmin 4: Authentication bypass via a client-controlled identity header in Webserver authentication mode
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 57977d1f9ea7aa18a00b18e9e2cfc4b86baac45eb6a626e6399c70fc32bbed93
- Ingested
- 23 Sep 2026, 09:37:28 UTC
- Source record
- Official CVE record