Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide optional zip bomb protection #120

Open
cyrilmhansen opened this issue Apr 19, 2019 · 1 comment
Open

Provide optional zip bomb protection #120

cyrilmhansen opened this issue Apr 19, 2019 · 1 comment

Comments

@cyrilmhansen
Copy link

Zip bombs are small zip files that can uncompress to huge files to create a denial of service attacks.

Zt-zip does not seem to offer protection which is described in :

http://cwe.mitre.org/data/definitions/409.html

https://wiki.sei.cmu.edu/confluence/display/java/IDS04-J.+Safely+extract+files+from+ZipInputStream

This would be nice to have

@toomasr
Copy link
Contributor

toomasr commented Apr 20, 2019

Interesting. Not sure if a such a level lib should have the necessary logic for such attacks. If a system is dealing with zip archives from untrusted sources then I would put the validation there.

Also the example shows that we should limit the zip entry sizes to 100mb or some other arbitrary number. Not sure if we can find a great constant for such a thing.

If a user has such a use case then they can use the iterate method and uncompress only if their validation passes. See Iterate example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants