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
{{ message }}
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.
Attackers can create Zip archives that use path traversal to overwrite important files on affected systems, destroying them or replacing them with malicious alternatives or upload a new one with a malicious code.
How to reproduce
Create file with some code, for example:
<?php
phpinfo();
?>
Name it somehow like this "xxxphpinfo.php".
Create a zip archive.
Open zip archive in hex editor. Change xxx to ../ in two places: in the top of the hex and in the bottom.
Pass modified archive to the Ne-Lexa/php-zip extraction function. For example:
As far as I can see this is fixed with PHP 5.7.
So users should upgrade their PHP version.
As we are only relying on the ZIP module of PHP we cannot fix it for them.
Description
Attackers can create Zip archives that use path traversal to overwrite important files on affected systems, destroying them or replacing them with malicious alternatives or upload a new one with a malicious code.
How to reproduce
I don't have folders in archive, but with and without it works the same.
6) Navigate to ../uploads and execute phpinfo.php.
Possible Solution
Use php zlib or somehow escape ../ characters.
Additional context
More about vulnerability:
https://snyk.io/research/zip-slip-vulnerability
Archive example:
php2.zip
The text was updated successfully, but these errors were encountered: