-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unsafe Deserialization and Remote Code Execution by an Authenticated user in pgAdmin 4 (CVE-2024-2044) #7258
Comments
I’m using pgadmin4 v 7.3 and installed locally on my laptop to connect GCP (Google cloud platform) instances. Will this CVE-2024-2044 - pgAdmin (<=8.3) Path Traversal in Session Handling Leads to Unsafe Deserialization and Remote Code Execution (RCE) impact me? |
It is mentioned in the issue description - |
Reported by: Davide TheZero thezero@shielder.it along with attachment path_traversal_leads_to_unsafe_deserialization.md for reproducing.
Summary:
pgAdmin 4 uses a file-based session management approach. The session files are saved on disk as pickle objects. When a user performs a request, the value of the session cookie 'pga4_session' is used to retrieve the file, then its content is deserialised, and finally its signature verified.
The cookie value is split in 2 parts at the first '!' character. The first part is the session ID (sid), while the second is the session digest.
The vulnerability lies in versions of pgAdmin prior to 8.4 where a method loads session files by concatenating the sessions folder - located inside the pgAdmin 4 DATA_DIR - with the session ID. Precisely, the two values are concatenated using the ['os.path.join'] function. It does not set a trusted base-path which should not be escaped
This issue does not affect users running pgAdmin in desktop mode.
The text was updated successfully, but these errors were encountered: