CVE-2023-5002 is a medium-severity (CVSS 6) OS Command Injection vulnerability in pgadmin4. A fix is available for pgadmin4 — see the affected versions and patch details below.
Pgadmin4: remote code execution by an authenticated user
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-5002.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
pgadmin4Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in pgAdmin. This issue occurs when the pgAdmin server HTTP API validates the path a user selects to external PostgreSQL utilities such as pg_dump and pg_restore. Versions of pgAdmin prior to 7.6 failed to properly control the server code executed on this API, allowing an authenticated user to run arbitrary commands on the server.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | pgadmin4 | all versions | 7.7pip install --upgrade 'pgadmin4==7.7' |
Affected Products
fedorafedoraprojectpgadmin 4pgadminDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pgadmin4, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update pgadmin4 to 7.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-5002 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2023-5002 in your dependencies?
Find it across PyPI, including transitive dependencies.