CVE-2026-116247: pgAdmin 4: libpq uses the pgAdmin service account's own password file and client certificate
When a server in pgAdmin 4 had no password file, client certificate or client key configured, or the configured one could not be found, pgAdmin left the parameter out of the connection and libpq fell back to the defaults of the operating-system account running pgAdmin: ~/.pgpass, ~/.postgresql/postgresql.crt and postgresql.key, or PGPASSFILE, PGSSLCERT and PGSSLKEY. In server mode any user could therefore connect to a server with the service account's saved passwords or client certificate, and supplying only a copy of its public certificate was enough for libpq to pair it with the service account's private key. A pgservice.conf entry, or a maintenance database name read as a connection string by pgdumpall, could bring the same files back for the utilities.
The fix gives each of these parameters a value in server mode, the user's own file or otherwise a path that can never be opened, in the connection string, in the environment of the utilities and in the --dbname connection string that ranks above a service entry. Desktop mode is unchanged.
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?
Server-mode pgAdmin 4 deployments before 9.19 are affected. Desktop mode is unchanged.
What does an attacker need to exploit this?
An authenticated pgAdmin user can exploit the issue when a server connection lacks a configured password file, client certificate, or client key, or when the configured file cannot be found. libpq can then fall back to credentials and keys belonging to the operating-system account that runs pgAdmin.
Can this affect pgAdmin utilities as well as interactive connections?
Yes. A pg_service.conf entry or a maintenance database name interpreted as a connection string by pg_dumpall can cause the service account's default credential or certificate files to be used by utilities.
What is the immediate mitigation if upgrading is not possible?
Ensure every server connection has explicit, valid password-file, client-certificate, and client-key settings rather than leaving them absent or pointing to missing files. Also protect or remove default libpq files for the pgAdmin service account, including ~/.pgpass and ~/.postgresql/postgresql.crt and postgresql.key, and review PGPASSFILE, PGSSLCERT, and PGSSLKEY.
How could certificate-based access be abused?
Supplying only a copy of the service account's public certificate may be sufficient for libpq to pair it with that account's private key. This can let a pgAdmin user authenticate using the service account's client certificate material.