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

Published Sep 15, 2023
·
Updated

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 pgdump and pgrestore. 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.

Other sources

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 pgdump and pgrestore. Versions of pgAdmin prior to 7.7 failed to properly control the server code executed on this API, allowing an authenticated user to run arbitrary commands on the server.

GitHub

The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external PostgreSQL utilities such as pgdump and pgrestore. The utility is executed by the server to determine what PostgreSQL version it is from.

Versions of pgAdmin prior to 7.7 failed to properly control the server code executed on this API, which could allow an authenticated user to run arbitrary commands on the server. Users can use the commands as filenames and check for validating the path using the API. This would inject the command in the path validator and execute the command on the pgAdmin server.

This issue does not affect users running pgAdmin in desktop mode.

Reference: https://github.com/pgadmin-org/pgadmin4/issues/6763

Red Hat

Affected Software

6 affected componentsFixes available
redhat/pgadmin4<7.7
7.7
pgAdmin Pgadmin Postgresql<7.7
pip/pgadmin4<7.7
7.7
pgAdmin Pgadmin 4 Postgresql<7.7
Fedoraproject Fedora=37
Fedoraproject Fedora=38

Event History

Sep 22, 2023
CVE Published
via MITRE·01:31 PM
Data Sourced
via MITRE·01:31 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:30 PM
Data Sourced
via GitHub·03:30 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this flaw?

The vulnerability ID for this flaw is CVE-2023-5002.

2

What is the severity level of CVE-2023-5002?

CVE-2023-5002 has a severity level of high.

3

Which versions of pgAdmin are affected by this vulnerability?

Versions of pgAdmin prior to 7.7 are affected by this vulnerability.

4

What is the risk associated with this vulnerability?

The risk associated with CVE-2023-5002 is rated at 8.8 (high).

5

Are there any references or additional resources related to this vulnerability?

Yes, you can find more information about CVE-2023-5002 in the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2023-5002), [GitHub Issue](https://github.com/pgadmin-org/pgadmin4/issues/6763), [Red Hat Bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=2239164)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203