pgAdmin 4: Path Traversal: 'dir....filename'
CVE-2024-2044 is a critical-severity path traversal: 'dir....filename' vulnerability in pgAdmin 4 from Pgadmin.org, with a CVSS 3.1 base score of 9.9 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. The record lists version 8.4 as the first without the flaw, so updating pgAdmin 4 to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 79.5% chance of exploitation within 30 days, which is in the top 0.39% of all scored CVEs.
Exploitation in the next 30 days is more likely than not, according to EPSS.
What to do
- Update pgAdmin 4 to 8.4 or a later version.
- Update pgadmin_4 to 8.4 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Pgadmin.org | pgAdmin 4 | before 8.4 | 8.4 |
| PostgreSQL | pgadmin_4 | before 8.4 | 8.4 |
| Fedora Project | fedora | 40 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Scored by CNA.
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Path Traversal: 'dir....filename'
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize 'dir....filename' (multiple internal backslash dot dot) sequences that can resolve to a location that is outside of that directory.
How developers prevent this class of flaw
- Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
More Path Traversal: 'dir....filename' vulnerabilities (CWE-31)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/pgadmin-org/pgadmin4/issues/7258Issue Tracking
Technical write-ups (may include proof of concept)
- shielder.com/advisories/pgadmin-path-traversal_leads_to_unsafe_deserialization_and_rce/Exploit, Third Party Advisory
Other references
Other vulnerabilities in pgAdmin 4
- 9.6 Critical severity
- 9.6 Critical severity
- 7.6 High severity
- 9.6 Critical severity
- 9.6 Critical severity
- 8.8 High severity
Recent Path Traversal: 'dir....filename' vulnerabilities
- 7.5 High severity
Spotted an error? Tell us.