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 package | Versions | Reported by |
|---|---|---|
| pgadmin.org pgAdmin 4 | from 7.6 before 9.15 | CVE List |
| pgadmin4 (PyPI) | before 9.15 | GitHub Advisory Database, PyPA Advisory Database |
| pgadmin pgadmin_4 | from 7.6 before 9.15 | NVD |
All scores
| PostgreSQL | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| PostgreSQL | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | CVSS: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 Database | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS: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
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
| https://github.com/pgadmin-org/pgadmin4/issues/9898 | issue-tracking, patch, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-7815 | advisory | |
| https://github.com/pgadmin-org/pgadmin4/commit/cf53953d9 | web | |
| https://github.com/pgadmin-org/pgadmin4 | package | |
| https://pypi.org/project/pgadmin4 | package | |
| https://github.com/advisories/GHSA-hp84-p2gq-6fvr | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-7815 changed 2026-05-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hp84-p2gq-6fvr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-7815 changed 2026-10-26 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2867 changed 2026-07-13 | CC-BY-4.0 |