{"id":"CVE-2026-116245","state":"PUBLISHED","title":"pgAdmin 4: Connection services are not restricted in server mode","description":"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.\n\nThe 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.\n\nThis issue affects pgAdmin 4: before 9.19.","publishedAt":"2026-10-30T19:55:15.679Z","updatedAt":"2026-10-30T19:55:15.679Z","severity":{"score":7.1,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N","source":"PostgreSQL"},"assigner":"PostgreSQL","products":["pgadmin.org pgAdmin 4"],"affected":[{"vendor":"pgadmin.org","product":"pgAdmin 4","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"9.19","versionType":"custom"}],"repo":"https://github.com/pgadmin-org/pgadmin4","modules":["Servers","Backup","Restore","Import/Export Data","Maintenance","PSQL Tool"],"programFiles":["https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/utils/driver/psycopg3/server_manager.py","https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/__init__.py"]}],"references":["https://github.com/pgadmin-org/pgadmin4/issues/10654","https://github.com/pgadmin-org/pgadmin4/commit/a0c8f4857f732c6f5e5bacf4b289b811bb5c6a06"],"weaknesses":["CWE-522","CWE-862"],"ingestedAt":"2026-10-30T20:04:06.178Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/116xxx/CVE-2026-116245.json","commit":"7684a5927aa3dceabed8dec00447545f1b10f31f","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-116245","state":"PUBLISHED","datePublished":"2026-10-30T19:55:15.679Z","dateUpdated":"2026-10-30T19:55:15.679Z","assignerShortName":"PostgreSQL","assignerOrgId":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","dateReserved":"2026-10-25T16:26:16.419Z"},"containers":{"cna":{"title":"pgAdmin 4: Connection services are not restricted in server mode","descriptions":[{"lang":"en","value":"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.\n\nThe 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.\n\nThis issue affects pgAdmin 4: before 9.19."}],"affected":[{"vendor":"pgadmin.org","product":"pgAdmin 4","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"9.19","versionType":"custom"}],"repo":"https://github.com/pgadmin-org/pgadmin4","modules":["Servers","Backup","Restore","Import/Export Data","Maintenance","PSQL Tool"],"programFiles":["https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/utils/driver/psycopg3/server_manager.py","https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/__init__.py"]}],"references":[{"url":"https://github.com/pgadmin-org/pgadmin4/issues/10654","tags":["issue-tracking"]},{"url":"https://github.com/pgadmin-org/pgadmin4/commit/a0c8f4857f732c6f5e5bacf4b289b811bb5c6a06","tags":["patch"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"Any authenticated user who can register a server or set connection parameters. Attack Complexity is High: the service account's service file (or environment) must hold a credential-bearing entry that a reachable server accepts, a deployment condition the attacker does not control. Scope is Changed because the connection uses credentials configured for the service account, never granted to the attacker; Confidentiality and Integrity are High on that database server. Availability is None."}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"NONE","baseSeverity":"HIGH","baseScore":8.2,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"Same reasoning as the CVSS 3.1 entry. AT:P for the credential-bearing service entry. VC:H because the stored secret is used through pgAdmin; SC:H/SI:H for the database server reached with it."}],"cvssV4_0":{"version":"4.0","vectorString":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N","baseScore":7.1,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-522","lang":"en","description":"CWE-522 Insufficiently Protected Credentials","type":"CWE"},{"cweId":"CWE-862","lang":"en","description":"CWE-862 Missing Authorization","type":"CWE"}]}],"providerMetadata":{"shortName":"PostgreSQL","orgId":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","dateUpdated":"2026-10-30T19:55:15.679Z"},"datePublic":"2026-10-29T00:00:00.000Z","credits":[{"lang":"en","value":"Dave Page <dpage@pgadmin.org>","type":"remediation developer"},{"lang":"en","value":"Kundan Sable <kundan.sable@enterprisedb.com>","type":"remediation reviewer"},{"lang":"en","value":"Hitesh Jambhale <hitesh.jambhale@enterprisedb.com>","type":"remediation reviewer"},{"lang":"en","value":"Ashesh Vashi <ashesh.vashi@enterprisedb.com>","type":"remediation reviewer"}],"source":{"discovery":"INTERNAL"}}}}}