CVE-2025-2945 pgAdmin 4: Remote Code Execution in Query Tool and Cloud Deployment

Critical 9.9 Published Updated

Attackers can execute arbitrary code via unsafe eval() calls in pgAdmin 4 Query Tool and Cloud Deployment modules.

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-2025-2945?

CVE-2025-2945 is a critical code injection vulnerability in pgadmin.org pgAdmin 4, published on 3 Apr 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Remote Code Execution security vulnerability in pgAdmin 4 (Query Tool and Cloud Deployment modules).

The vulnerability is associated with the 2 POST endpoints; /sqleditor/query_tool/download, where the query_commited parameter and /cloud/deploy endpoint, where the high_availability parameter is unsafely passed to the Python eval() function, allowing arbitrary code execution.

This issue affects pgAdmin 4: before 9.2.

Weakness: CWE-94

Which versions are affected by CVE-2025-2945?

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

PackageAffectedFixed in
pgadmin4 PyPIAll versions9.2
pgadmin4 PyPIAll versions9.2
pgadmin4 PyPIAll versions9.2

Products include Pgadmin Pgadmin 4.

How do I fix CVE-2025-2945?

Upgrade pgadmin4 to 9.2 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-2945 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-2945 exists.

Public exploit code: 1 Metasploit module and 7 proofs of concept on GitHub.

Sources

Also known as GHSA-g73c-fw68-pwx3, PYSEC-2026-451.

Is CVE-2025-2945 in your software?

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

Check your SBOMs for free