CVE-2026-17349
JSON

9.3critical

pgAdmin 4: Adhoc server clone leaks another user's stored database credentials and ownership to a non-owner

Severity
9.3critical CVSS:4.0 by PostgreSQL
Exploit likelihood
0.33% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PostgreSQL

Description

/misc/workspace/adhoc_connect_server, part of the Workspaces feature introduced in pgAdmin 4 9.0, when passed the id of an existing server, clones that server via Server.clone(), which copies every column from the source row, including user_id, shared, shared_username, and the stored credential fields password, save_password, and tunnel_password. When a non-owner triggered an adhoc connect against another user's (in practice, typically an administrator's) shared server, the clone inherited that user's ownership, shared flag, and stored database credentials verbatim. pgAdmin persisted this cross-tenant, credential-bearing server row before the connection was even attempted, so it survived even when the connection subsequently failed. The non-owner could then open the newly-owned clone and pgAdmin would connect using the source user's stored database password on the non-owner's behalf, granting the non-owner use of database credentials -- and whatever database privileges they confer -- that were never their own. Fix forces the cloned adhoc record's ownership fields (user_id, shared, shared_username) and stored credential fields (password, save_password, tunnel_password) to belong to the calling user and be cleared/private before committing, regardless of the source server's ownership, sharing state, or stored credentials. A regression test asserts that an adhoc connect triggered by a non-owner against another user's shared server persists a row owned by the caller, not shared, and without the source's stored credentials. This issue affects pgAdmin 4: from 9.0 before 9.17.

Affected

Product or packageVersionsReported by
pgadmin.org pgAdmin 4from 9.0 before 9.17CVE List
pgadmin pgadmin_4from 9.0 before 9.17NVD

All scores

PostgreSQL9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
PostgreSQL9.3critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N

Classification

CWE-522CWE-639

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

/misc/workspace/adhoc_connect_server, part of the Workspaces feature introduced in pgAdmin 4 9.0, when passed the id of an existing server, clones that server via Server.clone(), which copies every column from the source row, including user_id, shared, shared_username, and the stored credential fields password, save_password, and tunnel_password. When a non-owner triggered an adhoc connect against another user's (in practice, typically an administrator's) shared server, the clone inherited that user's ownership, shared flag, and stored database credentials verbatim. pgAdmin persisted this cross-tenant, credential-bearing server row before the connection was even attempted, so it survived even when the connection subsequently failed. The non-owner could then open the newly-owned clone and pgAdmin would connect using the source user's stored database password on the non-owner's behalf, granting the non-owner use of database credentials -- and whatever database privileges they confer -- that were never their own. Fix forces the cloned adhoc record's ownership fields (user_id, shared, shared_username) and stored credential fields (password, save_password, tunnel_password) to belong to the calling user and be cleared/private before committing, regardless of the source server's ownership, sharing state, or stored credentials. A regression test asserts that an adhoc connect triggered by a non-owner against another user's shared server persists a row owned by the caller, not shared, and without the source's stored credentials. This issue affects pgAdmin 4: from 9.0 before 9.17.

NVD (es)

/misc/workspace/adhoc_connect_server, parte de la característica Workspaces introducida en pgAdmin 4 9.0, cuando se le pasa el ID de un servidor existente, clona ese servidor a través de Server.clone(), lo que copia cada columna de la fila de origen, incluyendo user_id, shared, shared_username, y los campos de credenciales almacenadas password, save_password, y tunnel_password. Cuando un no-propietario activaba una conexión ad-hoc contra el servidor compartido de otro usuario (en la práctica, típicamente de un administrador), el clon heredaba la propiedad de ese usuario, el indicador de compartido, y las credenciales de la base de datos almacenadas textualmente. pgAdmin persistía esta fila de servidor entre inquilinos y portadora de credenciales antes de que la conexión fuera siquiera intentada, por lo que sobrevivía incluso cuando la conexión fallaba posteriormente. El no-propietario podía entonces abrir el clon recién adquirido y pgAdmin se conectaría usando la contraseña de la base de datos almacenada del usuario de origen en nombre del no-propietario, otorgando al no-propietario el uso de credenciales de la base de datos -- y cualesquiera privilegios de la base de datos que estas confieran -- que nunca fueron suyas. La corrección fuerza que los campos de propiedad del registro ad-hoc clonado (user_id, shared, shared_username) y los campos de credenciales almacenadas (password, save_password, tunnel_password) pertenezcan al usuario que realiza la llamada y se borren/privaticen antes de la confirmación, independientemente de la propiedad del servidor de origen, el estado de compartido o las credenciales almacenadas. Una prueba de regresión afirma que una conexión ad-hoc activada por un no-propietario contra el servidor compartido de otro usuario persiste una fila propiedad del llamador, no compartida, y sin las credenciales almacenadas del origen. Este problema afecta a pgAdmin 4: desde 9.0 antes de 9.17.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-17349 changed 2026-08-01CVE Terms of Use
NVDCVE-2026-17349 changed 2026-10-23Public domain