Exploit database

Vulnerability

CVE-2024-2044

Unsafe Deserialisation and Remote Code Execution by an Authenticated user in pgAdmin 4

Vulnerability details

Score
9.9
Severity
critical

CVSS 3.1 · PostgreSQL

Vector string

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Description

pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling code. If the server is running on Windows, an unauthenticated attacker can load and deserialize remote pickle objects and gain code execution. If the server is running on POSIX/Linux, an authenticated attacker can upload pickle objects, deserialize them, and gain code execution.

CVE Program

Exploit source choices

3 sources
pgAdmin Session Deserialization RCE
MSF-multi--http--pgadmin_session_deserializationMetasploitPython / remotePreferred

pgAdmin versions <= 8.3 have a path traversal vulnerability within their session management logic that can allow a pickled file to be loaded from an arbitrary location. This can be used to load a malicious, serialized Python object to execute code within the context of the target application. This exploit supports two techniques by which the payload can be loaded, depending on whether or not credentials are specified. If valid credentials are provided, Metasploit will login to pgAdmin and upload a payload object using pgAdmin's file management plugin. Once uploaded, this payload is executed via the path traversal before being deleted using the file management plugin. This technique works for both Linux and Windows targets. If no credentials are provided, Metasploit will start an SMB server and attempt to trigger loading the payload via a UNC path. This technique only works for Windows targets. For Windows 10 v1709 (Redstone 3) and later, it also requires that insecure outbound guest access be enabled. Tested on pgAdmin 8.3 on Linux, 7.7 on Linux, 7.0 on Linux, and 8.3 on Windows. The file management plugin underwent changes in the 6.x versions and therefor, pgAdmin versions < 7.0 can not utilize the authenticated technique whereby a payload is uploaded.

2024-03-04pgadmin_session_deserialization.rb
12442rf/poc
GH-3a840c3a743e0417793b49231edf2d51GitHubUnofficial GitHub source

12442rf/poc source repository

2025-05-0612 files · 1 stars
hanzzly/cve-2024-2044
GH-9803f6bee959bfdb183246d8d7373768GitHubUnofficial GitHub source

hanzzly/cve-2024-2044 source repository

2026-09-132 files · 1 stars