Summary
CVE-2026-86863 is a critical authentication bypass vulnerability (CWE-290: Authentication Bypass by Spoofing) in pgAdmin 4’s "Webserver" authentication mode. When this mode is enabled, an unauthenticated network attacker can supply a client-controlled HTTP header to be logged in as an arbitrary user, including an administrator, without presenting any credentials. The flaw carries a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause: pgAdmin’s
WebserverAuthentication.get_user()reads the configuredWEBSERVER_REMOTE_USERidentity from the WSGI/CGI environment; when that variable is absent it falls back to reading the same name directly from the inbound HTTP request headers viarequest.headers.get(). - Because HTTP request headers are set by whoever sends the request, any client able to reach the pgAdmin instance could supply that header itself and assert any username, including an existing administrator account.
- The exposure is widened further when
WEBSERVER_REMOTE_USERis configured to anHTTP_-prefixed or hyphenated name (e.g.,HTTP_X_FORWARDED_USER), since WSGI’s convention of converting HTTP headers intoHTTP_-prefixed environment variables lets a client-supplied header satisfy the same environment lookup. - Attack vector: network, no authentication or user interaction required (AV:N/AC:L/PR:N/UI:N).
- Impact: complete compromise of the pgAdmin installation, including full administrative access and exposure of all stored database connection credentials.
- Trigger condition: the "webserver" authentication source must be enabled in
AUTHENTICATION_SOURCES(i.e., pgAdmin deployed in server mode behind a reverse proxy/web server intended to assert user identity).
Affected software
- pgAdmin 4 versions 6.2 up to (but not including) 9.18, when the "webserver" authentication source is enabled.
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade to pgAdmin 4 version 9.18 or later, which introduces a stricter, opt-in trust model — genuine WSGI-provided identity is distinguished from header-derived identity, header-based identity assertion requires explicit opt-in via
WEBSERVER_REMOTE_USER_FROM_HEADER, the requesting peer must be listed inWEBSERVER_TRUSTED_PROXIES, an optional shared secret (WEBSERVER_SHARED_SECRET_HEADER/WEBSERVER_SHARED_SECRET) can be enforced via constant-time comparison, and login is refused for accounts whose auth source is notwebserver. - If immediate patching is not possible: Disable "webserver" authentication mode until upgraded, or ensure the reverse proxy in front of pgAdmin strips/overwrites any client-supplied identity headers (e.g.,
X-Forwarded-Useror whatever header maps toWEBSERVER_REMOTE_USER) before forwarding requests, and restrict direct network access to the pgAdmin backend so it is only reachable through the trusted proxy.

