You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extract and extractall methods in the ZipFile class are vulnerable to directory traversal attacks, allowing files to be written anywhere on disk, regardless of the target path specified by the developer.
Detailed description of the vulnerability is available on our webpage:
After extracting the archive using the extractall method, the vulnerable.txt file will be created in the /tmp directory with the contents "vulnerable".
Possible Impact
This vulnerability can be exploited, for example, to overwrite the authorized_keys file in a user's home directory, enabling an attacker to connect to the affected server via SSH.
Summary
Fix for this vulnerability is available in pull request #41 , containing additional filename sanitization.
The text was updated successfully, but these errors were encountered:
Descritpion
The
extract
andextractall
methods in theZipFile
class are vulnerable to directory traversal attacks, allowing files to be written anywhere on disk, regardless of the target path specified by the developer.Detailed description of the vulnerability is available on our webpage:
Proof of Concept
If we create zip archive with following code:
Then we can extract the created archive using extractall method:
After extracting the archive using the
extractall
method, thevulnerable.txt
file will be created in the/tmp
directory with the contents "vulnerable".Possible Impact
This vulnerability can be exploited, for example, to overwrite the
authorized_keys
file in a user's home directory, enabling an attacker to connect to the affected server via SSH.Summary
Fix for this vulnerability is available in pull request #41 , containing additional filename sanitization.
The text was updated successfully, but these errors were encountered: