CVE-2026-7815
JSON

8.7high

pgAdmin 4: SQL injection in Maintenance tool option values leading to remote code execution

Severity
8.7high CVSS:4.0 by PostgreSQL
Exploit likelihood
0.46% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PostgreSQL
Also known as
GHSA-hp84-p2gq-6fvrPYSEC-2026-2867

Description

SQL injection vulnerability in pgAdmin 4 Maintenance Tool. Four user-supplied JSON fields (buffer_usage_limit, vacuum_parallel, vacuum_index_cleanup, reindex_tablespace) were concatenated directly into the rendered VACUUM/ANALYZE/REINDEX command and passed to psql --command. An authenticated user with the tools_maintenance permission could break out of the option syntax and execute arbitrary SQL on the connected PostgreSQL server. The injected SQL could in turn invoke COPY ... TO PROGRAM to escalate to operating-system command execution on the database host. Fix introduces server-side allow-listing of all four fields and switches reindex_tablespace from manual quoting to the qtIdent filter. This issue affects pgAdmin 4: before 9.15.

Affected

Product or packageVersionsReported by
pgadmin.org pgAdmin 4from 7.6 before 9.15CVE List
pgadmin4 (PyPI)before 9.15GitHub Advisory Database, PyPA Advisory Database
pgadmin pgadmin_4from 7.6 before 9.15NVD

All scores

PostgreSQL8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PostgreSQL8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Classification

CWE-89

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

What each source says

CVE List

SQL injection vulnerability in pgAdmin 4 Maintenance Tool. Four user-supplied JSON fields (buffer_usage_limit, vacuum_parallel, vacuum_index_cleanup, reindex_tablespace) were concatenated directly into the rendered VACUUM/ANALYZE/REINDEX command and passed to psql --command. An authenticated user with the tools_maintenance permission could break out of the option syntax and execute arbitrary SQL on the connected PostgreSQL server. The injected SQL could in turn invoke COPY ... TO PROGRAM to escalate to operating-system command execution on the database host. Fix introduces server-side allow-listing of all four fields and switches reindex_tablespace from manual quoting to the qtIdent filter. This issue affects pgAdmin 4: before 9.15.

NVD (es)

Vulnerabilidad de inyección SQL en la herramienta de mantenimiento de pgAdmin 4. Cuatro campos JSON proporcionados por el usuario (buffer_usage_limit, vacuum_parallel, vacuum_index_cleanup, reindex_tablespace) se concatenaron directamente en el comando VACUUM/ANALYZE/REINDEX renderizado y se pasaron a psql --command. Un usuario autenticado con el permiso tools_maintenance podría escapar de la sintaxis de la opción y ejecutar SQL arbitrario en el servidor PostgreSQL conectado. El SQL inyectado podría a su vez invocar COPY ... TO PROGRAM para escalar a la ejecución de comandos del sistema operativo en el host de la base de datos. La solución introduce una lista de permitidos del lado del servidor para los cuatro campos y cambia reindex_tablespace del entrecomillado manual al filtro qtIdent. Este problema afecta a pgAdmin 4: anterior a la 9.15.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-7815 changed 2026-05-11CVE Terms of Use
GitHub Advisory DatabaseGHSA-hp84-p2gq-6fvr changed 2026-09-10CC-BY-4.0
NVDCVE-2026-7815 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2867 changed 2026-07-13CC-BY-4.0