CVE-2024-55587
Python vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2024-55587) affects python-libarchive through version 4.2.1, specifically impacting the extract functionality in zip.py for ZipFile.extractall and ZipFile.extract methods. The vulnerability was disclosed on December 11, 2024, and allows attackers to perform directory traversal attacks to create files in arbitrary locations (NVD).

Technical details

The vulnerability stems from improper input sanitization in the ZipFile class's extract and extractall methods. The issue is specifically located in zip.py where the code uses os.path.join to combine unsanitized user input with the intended extraction path, making it susceptible to directory traversal attacks. The vulnerability has been assigned a CVSS v3.1 base score of 8.8 (HIGH) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (GitHub Issue, NVD).

Impact

The vulnerability allows attackers to write files to arbitrary locations on the disk, regardless of the target path specified by the developer. For example, it could be exploited to overwrite sensitive files such as the authorized_keys file in a user's home directory, potentially enabling unauthorized SSH access to the affected server (GitHub Issue).

Mitigation and workarounds

A fix for this vulnerability has been proposed in pull request #41, which implements additional filename sanitization logic borrowed from the pyzipper project. The fix includes a new sanitize_filename method to prevent directory traversal attacks (GitHub PR).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management