Skip to content

SECURITY: vulnerable to zip-slip (possible remote code execution/file overwrite) #232

Description

@aviadatsnyk

Background

https://github.com/snyk/zip-slip-vulnerability

Steps to reproduce

  1. get a malicious zip file, i.e. https://gist.github.com/grnd/61e3244bfff85cbe025f5bd4c60ba842
  2. unpack with new FastZip().ExtractZip(@"zip-slip-win.zip", @"c:\target", null);
  3. profit

Expected behavior

either the whole extraction should be stopped, or the files that are being extracted outside of the destination folder should not be extracted.

Actual behavior

All files are extracted.

Version of SharpZipLib

All

Obtained from (place an x between the brackets for all that apply)

  • Compiled from source
  • branch: all
  • commit: any
  • Downloaded DLL from GitHub
  • Downloaded DLL from SourceForge
  • Downloaded DLL from _______
  • DLL included as part of
  • Package installed using:
  • NuGet
  • MyGet
  • Chocolatey

Reporters

Yusuke Fujiwara - @yfakariya
Yann McCready, Genetec

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions