CVE-2026-7815: SQL injection in pgAdmin 4 Maintenance Tool leading to remote code execution
- Vendor
- Pgadmin
CVE-2026-7815 is a SQL injection vulnerability in the pgAdmin 4 Maintenance Tool affecting pgAdmin 4 versions 7.6 through before 9.15. The flaw arises because four user-controlled JSON fields used by maintenance operations were concatenated directly into generated VACUUM, ANALYZE, and REINDEX SQL statements and then executed via psql using the --command option. This unsafe command construction allowed an authenticated user with the tools_maintenance permission to break out of the intended option syntax and inject arbitrary SQL against the connected PostgreSQL server. The issue also involved improper handling of the tablespace parameter for REINDEX, which was corrected by replacing manual quoting with the qtIdent filter, alongside server-side allow-list validation for all affected fields.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows arbitrary SQL execution on the connected PostgreSQL server with the privileges of the active database connection used by pgAdmin. This can result in unauthorized data access, data modification, and service disruption. Where the connected PostgreSQL role has sufficient privileges, particularly superuser-level capability, the attacker can further escalate from SQL injection to operating-system command execution on the database host through PostgreSQL functionality such as COPY ... TO PROGRAM. In that scenario, commands would execute with the privileges of the PostgreSQL service account, potentially enabling full compromise of the database host.
Mitigation
If you can’t patch tonight, do this now.
If immediate upgrade is not possible, restrict access to the Maintenance Tool to only fully trusted administrators and review assignments of the tools_maintenance permission. Avoid using highly privileged PostgreSQL accounts, especially superuser roles, for pgAdmin connections where not operationally required, as this reduces the likelihood of escalation from SQL injection to host-level command execution. Limit pgAdmin exposure to trusted networks and monitor maintenance operations for anomalous SQL behavior. These measures reduce exposure but do not eliminate the underlying vulnerability.
Remediation
Patch, then assume compromise.
Upgrade pgAdmin 4 to version 9.15 or later. The vendor fix adds server-side allow-listing for the affected maintenance option fields and changes REINDEX tablespace handling to use the qtIdent filter for proper identifier escaping. Systems running affected versions should be updated promptly, especially where the Maintenance Tool is exposed to users with maintenance privileges or where pgAdmin connects using highly privileged PostgreSQL roles.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2026-7815 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-7815 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-7815?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-7815.
- Is there a patch for CVE-2026-7815?
- Upgrade pgAdmin 4 to version 9.15 or later. The vendor fix adds server-side allow-listing for the affected maintenance option fields and changes REINDEX tablespace handling to use the qtIdent filter for proper identifier escaping.
- What products are affected by CVE-2026-7815?
- Pgadmin 4.
- How severe is CVE-2026-7815?
- CVE-2026-7815 has a CVSS v4 score of 8.7 (High) and an EPSS score of 0.46% (40th percentile) as of Sep 25, 2026.
Recent activity
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.