---
id: "CVE-2026-116245"
kind: "vulnerability"
aliases: ["CVE-2026-116245"]
title: "pgAdmin 4: any server-mode user can reach OS-account database credentials"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pgadmin", "postgresql", "self-hosted"]
not_affected_if: ["desktop-mode", "no-service-file", "pgadmin-9.19-or-later"]
published_at: "2026-10-30T20:17:04+00:00"
first_seen_at: "2026-10-30T20:25:37+00:00"
updated_at: "2026-10-30T20:26:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116245", "first_seen_at": "2026-10-30T20:25:37+00:00"}]
---

# pgAdmin 4: any server-mode user can reach OS-account database credentials

In server mode, any pgAdmin user could point a connection at a service entry in the operating-system account's libpq service file, using the credentials stored there. Environment variables PGPASSWORD and PGSERVICE set for that account were also used for every connection and passed to utilities.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the pgAdmin version with `pgadmin4 --version` or the installed package version; affected if before `9.19`
- Check whether the pgAdmin 4 service account has a `~/.pg_service.conf` file or PGPASSWORD/PGSERVICE set in its environment
- Check whether pgAdmin is running in server mode with multiple users

## Fix

- pgAdmin 4: upgrade to `9.19` or later (sources state the fix is in 9.19 and later)
- Setting `SERVER_MODE_ALLOWED_SERVICES` is empty by default; list only the services that should be usable in server mode

## Timeline

- 2026-10-30T20:25:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116245

## From the sources

libpq looks a connection service up in the service file of the operating-system account running pgAdmin 4, and an entry there can hold a password or name a password file or client certificate. In server mode any user could set a server's Service, or a "service" connection parameter, to one of those entries and connect with its credentials. A PGPASSWORD or PGSERVICE variable set for that account was likewise used by libpq for every connection without a value of its own and passed on to the utilities, and pg_dumpall read a maintenance database name such as "service=..." as a connection string.

The fix adds the SERVER_MODE_ALLOWED_SERVICES setting, empty by default: in server mode only a listed service can be used, the servicefile parameter is refused, and PGPASSWORD and PGSERVICE are removed from pgAdmin's environment at startup. The allowlist is checked again on the final connection string, and the pg_dumpall database name is wrapped as a connection string.

This issue affects pgAdmin 4: before 9.19.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
