Headline
CVE-2023-31131: Arbitrary File Write when Extracting Tarballs retrieved from a remote location using `shutil.unpack_archive()`
Greenplum Database (GPDB) is an open source data warehouse based on PostgreSQL. In versions prior to 6.22.3 Greenplum Database used an unsafe methods to extract tar files within GPPKGs. greenplum-db is vulnerable to path traversal leading to arbitrary file writes. An attacker can use this vulnerability to overwrite data or system files potentially leading to crash or malfunction of the system. Any files which are accessible to the running process are at risk. All users are requested to upgrade to Greenplum Database version 6.23.2 or higher. There are no known workarounds for this vulnerability.
Summary
Greenplum Database used an unsafe methods to extract tar files within GPPKGs. It is vulnerable to path traversal leading to arbitrary file writes. An attacker can use this vulnerability to overwrite data or system files potentially leading to crash or malfunction of the system.
CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
CVSS score: 6.5 (CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H)
Impact
Greenplum Database versions older then 6.23.2 are vulnerable.
Mitigation
All users are requested to upgrade to Greenplum Database version 6.23.2 or higher
Credits
Thanks to Sim4n6 for reporting this issue to us.