CVE-2026-116247

Description

A flaw was found in pgAdmin. When running in server mode, database connections lacking configured authentication credentials cause the underlying connection library to default to the host operating system service account's credentials and certificates. An authenticated user can exploit this behavior to connect to database servers using the service account's stored passwords or private keys, leading to unauthorized database access and privilege escalation.

Statement

Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.

Mitigation

To mitigate this flaw, ensure that the operating system account running the pgAdmin service does not store credentials in default locations accessible to libpq:

1. Relocate or remove credential and certificate files from the service user's home directory (such as `/var/lib/pgadmin`):
Ensure files such as `~/.pgpass`, `~/.postgresql/postgresql.crt`, and `~/.postgresql/postgresql.key` are removed from the service account's profile.

2. Verify that libpq environment variables (`PGPASSFILE`, `PGSSLCERT`, `PGSSLKEY`) are unset in the service environment configuration.

3. Restart the pgAdmin service:
systemctl restart pgadmin4

Warning: Restarting the pgAdmin service will disconnect active user sessions. Removing these credential files may cause local administrative scripts or automated tasks that depend on the service account's default credentials to fail.

--- CME Mitigation Guidance (2026-11-06) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to prevent libpq from inheriting ambient service account credentials by enforcing explicit connection parameters or unopenable dummy paths across all server-mode connection strings and utility execution environments: upgrade to pgAdmin 4 9.19, which assign explicit connection parameters pointing to either the user's file or an unopenable dummy path across connection strings and utility environments to prevent libpq fallback, closing all 5 injection vectors (omitted connection authentication parameters, specifying non-existent credential file paths, pairing user-supplied public certificates with ambient host private keys, pg_service.conf service entries, maintenance database connection strings in pg_dumpall). Until patched, this is only a concern on Multi-user server mode pgAdmin deployments where the host service account maintains default PostgreSQL credentials — Standalone desktop mode deployments and environments where the daemon account has no local credential stores are unaffected — so Remove ~/.pgpass, ~/.postgresql/postgresql.crt, and ~/.postgresql/postgresql.key from the pgAdmin service user profile, and unset PGPASSFILE, PGSSLCERT, and PGSSLKEY in the service daemon environment. These controls limit blast radius and contain exploitation, but they do not fix the underlying ambient credential fallback defect — apply the upstream patch to fully remediate.

Understanding the Weakness (CWE)

Access Control

Technical Impact: Gain Privileges or Assume Identity

A user can access restricted functionality and/or sensitive information that may include administrative functionality and user accounts.

Frequently Asked Questions

Want to get errata notifications? Sign up here.