CVE-2026-7815 pgAdmin 4: SQL injection in Maintenance tool option values leading to remote code execution

High 8.7 Published Updated

Authenticated users can inject SQL via maintenance tool options to execute arbitrary commands on the database host.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-7815?

CVE-2026-7815 is a high-severity SQL injection vulnerability in pgadmin.org pgAdmin 4, published on 11 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-89

Which versions are affected by CVE-2026-7815?

3 open source packages ship an affected version, including pgadmin4. It affects 1 product.

PackageAffectedFixed in
pgadmin4 PyPIAll versions9.15
pgadmin4 PyPIAll versions9.15
pgadmin4 PyPIAll versions9.15

Products include Pgadmin Pgadmin 4.

How do I fix CVE-2026-7815?

Upgrade pgadmin4 to 9.15 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-7815 being exploited?

There is no known exploitation of CVE-2026-7815 in the wild and no public exploit code.

Sources

Also known as GHSA-hp84-p2gq-6fvr, PYSEC-2026-2867.

Is CVE-2026-7815 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free