• Stars
    star
    663
  • Rank 67,991 (Top 2 %)
  • Language
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zip Slip Vulnerability (Arbitrary file write through archive extraction)

Zip Slip

Zip Slip is a widespread critical archive extraction vulnerability, allowing attackers to write arbitrary files on the system, typically resulting in remote command execution. It was discovered and responsibly disclosed by the Snyk Security team ahead of a public disclosure on 5th June 2018, and affects thousands of projects, including ones from HP, Amazon, Apache, Pivotal and many more. This page provides the most up-to-date fix statuses for the libraries and projects that were found to be exploitable or contain a vulnerable implementation.

For more information on the technical details of Zip Slip, read http://snyk.io/research/zip-slip-vulnerability.

The vulnerability has been found in multiple ecosystems, including JavaScript, Ruby, .NET and Go, but is especially prevalent in Java, where there is no central library offering high level processing of archive (e.g. zip) files. The lack of such a library led to vulnerable code snippets being hand-crafted and shared among developer communities such as StackOverflow.

The vulnerability is exploited using a specially crafted archive that holds directory traversal filenames (e.g. ../../evil.sh). The Zip Slip vulnerability can affect numerous archive formats, including tar, jar, war, cpio, apk, rar and 7z.

Here is a vulnerable code example showing a ZipEntry path being concatenated to a destination directory without any path validation. Code similar to this has been found in many repositories across many ecosystems, including libraries which thousands of applications depend on.

   Enumeration<ZipEntry> entries = zip.getEntries();
   while (entries.hasMoreElements()) {
      ZipEntry e = entries.nextElement();
      File f = new File(destinationDir, e.getName());
      InputStream input = zip.getInputStream(e);
      IOUtils.copy(input, write(f));
   }

If you find a library or project that contains similar vulnerable code, we ask for your contribution to this repository to provide the community with the most up to date information about the Zip Slip vulnerability. To contribute, please refer to our CONTRIBUTING.md file.

Affected Libraries

Many of the following affected libraries exist because their ecosystems lack high level APIs providing the basic archive management capabilities. This results in vulnerable code being shared and reused. The following table contains the list of vulnerable libraries we found during private disclosure of Zip Slip which we aim to keep up to date, with community support, going forward as more vulnerable libraries are discovered. Some libraries that do not provide the high-level API often result in vulnerable implementations also, either through people copying and pasting vulnerable private code, or writing their own vulnerable snippets.

Vendor Product Language Confirmed vulnerable Fixed Version CVE Fixed
npm library unzipper JavaScript YES 0.8.13 CVE-2018-1002203 17/4/2018
npm library adm-zip JavaScript YES 0.4.9 CVE-2018-1002204 23/4/2018
Java library codehaus/plexus-archiver Java YES 3.6.0 CVE-2018-1002200 6/5/2018
Java library zeroturnaround/zt-zip Java YES 1.13 CVE-2018-1002201 26/4/2018
Java library zip4j Java YES 1.3.3 CVE-2018-1002202 13/6/2018
.NET library DotNetZip.Semverd .NET YES 1.11.0 CVE-2018-1002205 7/5/2018
.NET library SharpCompress .NET YES 0.21.0 CVE-2018-1002206 2/5/2018
Go library mholt/archiver Go YES N/A CVE-2019-10743
Oracle java.util.zip Java * No High Level API Documentation Fix N/A
Apache commons-compress Java * No High Level API Documentation Fix N/A 23/4/2018
.NET library SharpZipLib .NET YES v1.0.0 CVE-2018-1002208 19/8/2018
Ruby gem zip-ruby Ruby * No High Level API N/A
Ruby gem rubyzip Ruby YES CVE-2018-1000544
Ruby gem zipruby Ruby * No High Level API N/A
Go library archive Go * No High Level API N/A
Python library tarfile Python YES N/A
C++/qt library quazip C++ YES 0.7.6 CVE-2018-1002209 12/6/2018
Clojure library Raynes/fs Clojure YES akvo/fs 20180618-134534.a44cdd5b N/A 18/6/2018
Go library cloudfoundry/archiver Go YES 24/5/2018 N/A 24/5/2018
PHP library chumper/zipper PHP YES 1.0.3 N/A 26/2/2020
Perl library libarchive-zip-perl Perl YES CVE-2018-10860
Rust library rs-async-zip Rust * No High Level API Documentation Fix N/A

Projects Affected and Fixed

The following list of projects contain vulnerable code. Please add to this list as you find projects that are vulnerable to Zip Slip, or if you have further information about a project fix status.

Vendor Product Fixed date Fixed version CVE Vulnerable Code
Apache Storm Storm 2/5/2018 1.1.3, 1.2.2 CVE-2018-8008 #1 #2 #3 #4
Apache Software Foundation Apache Hadoop 30/5/2018 #1 #2 2.7.7, 2.8.5, 2.9.2, 3.0.3, 3.1.1 CVE-2018-8009
Apache Maven
Apache Ant 21/4/2018 1.9.12 CVE-2018-10886
Pivotal spring-integration-zip 3/5/2018 1.0.1 CVE-2018-1261
Pivotal spring-integration-zip 10/5/2018 1.0.2 CVE-2018-1263
HP Fortify Cloud Scan Jenkins Plugin 27/4/2018 1.5.2 #1
OWASP DependencyCheck 7/5/2018 3.2.0 CVE-2018-12036
Amazon AWS Toolkit for Eclipse 31/5/2018
SonarSource SonarQube 4/5/2018 6.7.4 LTS, 7.2 #1
Cinchapi Concourse 30/5/2018 #1
Orient Technologies OrientDB 31/5/2018 #1 #2
FenixEdu Academic 30/5/2018 #1
Lucee Lucee 5/6/2018 5.2.7.63, 5.2.8.47 #1
groovy-common-extensions groovy-common-extensions 3/7/2018 0.7.1 #1
fabric8 fabric8 5/6/2018 2.2.170-85 #1
Apache Tika 19/9/2018 1.19
Apache DeepLearning4J 10/24/2018 1.0.0-SNAPSHOT
FireGiant WiX Toolkit 09/19/2019 3.11.2 CVE-2019-16511

Defensively fixed but deemed not exploitable

Some projects were confirmed by the project maintainers that their implementation code was not vulnerable to Zip Slip. However they decided to remove or fix their implementation so that in the future, the snippets could not be copied and become vulnerable elsewhere.

Vendor Product Vulnerable Code Removed Vulnerable Code
Apache Kylin 24/4/2018 #1
Apache NiFi 24/4/2018 #1
Apache Geode 20/4/2018
Jenkins Jenkins CI 5/5/2018 #1
Elastic ElasticSearch 10/5/2018 #1
LinkedIn Pinot 22/5/2018 #1
AnkiDroid Anki-Droid 31/5/2018 #1
ata4 bspsrc 30/5/2018 #1
eirslett frontend-maven-plugin 30/5/2018 #1 #2

Affected and not yet fixed

Vendor Product Vulnerable Code CVE
unknwon cae/zip #1 CVE-2020-7664
unknwon cae/tz #1 CVE-2020-7668

Deemed not exploitable by the maintainer (vulnerable implementation remains)

The final list of projects are those with snippets of code that still have a vulnerable implementation, but are not exploitable. It is believed that it would not be possible to attack these projects in such a way that could lead to a malicious outcome, but the vulnerable pattern of code still exists within the code base. We strongly encourage such projects to fix the implementation both to prevent its use through other functionality, or use in other projects that copy paste snippets.

Vendor Product Vulnerable Code
JetBrains Intellij-community #1
Apache Apex #1
Apache Zeppelin #1
Apache Reef #1
Apache BookKeeper #1
Apache Pulsar #1
Apache Heron #1
Apache Gobblin #1
Apache Gobblin #1
Apache SystemML #1
Gradle Gradle #1
Gradle Gradle #1
Gradle Gradle #1
plasma-umass doppio #1
streamsets DataCollector #1

For more information on Zip Slip, go to http://snyk.io/research/zip-slip-vulnerability.

More Repositories

1

cli

Snyk CLI scans and monitors your projects for security vulnerabilities.
TypeScript
4,856
star
2

driftctl

Detect, track and alert on infrastructure drift
Go
2,431
star
3

actions

A set of GitHub actions for checking your projects for vulnerabilities
HTML
489
star
4

vulnerabilitydb

Snyk's public vulnerability database
369
star
5

vulncost

Find security vulnerabilities in open source npm packages while you code
JavaScript
201
star
6

parlay

Enrich SBOMs with data from third party services
Go
108
star
7

leaky-vessels-static-detector

Static detection tool for runc and Docker "Leaky Vessels" vulnerabilities
Go
94
star
8

leaky-vessels-dynamic-detector

Leaky Vessels Dynamic Detector
C
92
star
9

broker

A broker system between a public service and a private service
TypeScript
84
star
10

kubernetes-monitor

Use Snyk to find and fix vulnerabilities in your Kubernetes workloads
TypeScript
81
star
11

socketsleuth

Burp Extension to add additional functionality for pentesting websocket based applications
Java
76
star
12

release-notes-preview

GitHub Action for providing release notes preview for semantic releases
TypeScript
75
star
13

vscode-extension

Snyk extension for Visual Studio Code
TypeScript
75
star
14

snyk-to-html

export test reports from CLI to html
JavaScript
68
star
15

snyk-maven-plugin

Test and monitor your projects for vulnerabilities with Maven. This plugin is officially maintained by Snyk.
Java
63
star
16

nodejs-lockfile-parser

Generate a Snyk dependency tree from package-lock.json or yarn.lock file
TypeScript
52
star
17

snyk-intellij-plugin

Snyk Vulnerability Scanner for IDEs based on the IntelliJ platform
Kotlin
51
star
18

snyk-images

A build toolchain for Snyk Docker images.
TypeScript
51
star
19

awesome-snyk-community

Awesome Snyk community contributions, champions, integrations, blogs, tools and more 💜
42
star
20

serverless-snyk

Serverless plugin for securing your dependencies with Snyk
JavaScript
40
star
21

snyk-ls

Language Server using LSP meant to be used by IDEs as Snyk Backend for Frontends
Go
38
star
22

jobs

Job opportunities at Snyk - join us in driving Open Source Security!
JavaScript
38
star
23

policy-engine

Unified Policy Engine
Go
37
star
24

faker-security

Python Faker provider for security related data
Python
35
star
25

snyk-api-import

⚡️Snyk API powered import tool to help you automate & monitor a large scale import into Snyk organizations. Designed for onboarding with a built in queue & retries 📈
TypeScript
35
star
26

dep-graph

Represents a dependency graph
TypeScript
31
star
27

snyk-visual-studio-plugin

Snyk Visual Studio Extension
C#
27
star
28

snyk-azure-pipelines-task

TypeScript
26
star
29

resolve-deps

Resolves a node package tree with combined support for both npm@2 and npm@3
TypeScript
26
star
30

snyk-docker-plugin

This plugin provides dependency metadata for Docker images
TypeScript
24
star
31

snyk-gradle-plugin

Basic Snyk CLI plugin for Gradle support
TypeScript
24
star
32

user-docs

Gitbook documentation repo.
Go
23
star
33

sweater-comb

API linting rules
TypeScript
21
star
34

snyk-orb

Integrate Security into your CircleCI pipeline with Snyk
20
star
35

vervet

API resource versioning tool
Go
18
star
36

pkgbot

Superseded by @statsbot (private repo)
JavaScript
18
star
37

event-loop-spinner

Centralised event loop spinning
TypeScript
17
star
38

driftctl-action

GitHub Action for driftctl
Shell
17
star
39

artifactory-snyk-security-plugin

Allow Artifactory users to test their applications against the Snyk vulnerability database
Java
17
star
40

snyk-python-plugin

Basic Snyk CLI plugin for Python support
Python
16
star
41

homebrew-tap

An automatically updated Homebrew tap for Snyk
Ruby
16
star
42

nodejs-runtime-agent

Snyk Node Runtime Agent
JavaScript
16
star
43

snyk-apps-demo

Snyk demo app that showcases how Snyk Apps work, including the authorization flow.
TypeScript
15
star
44

gradle-plugin

Snyk Gradle Plugin - Scanning and monitoring your dependencies for security vulnerabilities from Gradle
Java
15
star
45

nexus-snyk-security-plugin

Allow Nexus users to test their applications against the Snyk vulnerability database
Java
15
star
46

snyk-eclipse-plugin

Eclipse plugin
Java
14
star
47

snyk-broker-helm

Smarty
12
star
48

snyk-poetry-lockfile-parser

TypeScript
11
star
49

java-call-graph-builder

Tool for building a call graph for the JVM ecosystem (Maven, Gradle...)
TypeScript
11
star
50

fluentd-logzio-kubernetes

A kubernetes daemonset that pushes your cluster logs to logz.io using fluentd
Shell
10
star
51

snyk-go-plugin

Basic Snyk CLI plugin for Golang support
TypeScript
10
star
52

ruby-semver

A semver parser that uses RubyGem's semantics with node-semver's api
TypeScript
10
star
53

cocoapods-lockfile-parser

Generate a Snyk dependency graph from a Podfile.lock file
TypeScript
9
star
54

teamcity-snyk-security-plugin

Allow TeamCity users to test their applications against the Snyk vulnerability database
Java
9
star
55

snyk-mvn-plugin

Basic Snyk CLI plugin for Maven support
TypeScript
9
star
56

code-client

Typescript consumer of public API
TypeScript
9
star
57

snyk-go-parser

A library to parse dependency manifests for Go
TypeScript
9
star
58

dotnet-deps-parser

Generate a dependency tree from .NET & .NET Core manifest files
TypeScript
8
star
59

unified-range

Uniform version ranges based on the Maven VersionRange spec
Python
8
star
60

scoop-snyk

A Scoop Bucket for Snyk, making installation on Windows easier
Ruby
8
star
61

snyk-iac-rules

Go
8
star
62

github-codeowners

TypeScript
8
star
63

snyk-sbt-plugin

Basic Snyk CLI plugin for SBT support
TypeScript
8
star
64

java-reachability-playground

Intentionally vulnerable repository for demonstration of reachability features
Java
7
star
65

policy

Snyk policy parser and matching logic
TypeScript
7
star
66

snyk-code-review-exercise

Example Code Review Exercise
7
star
67

snyk-github-import

Import projects from GitHub repos modified since a given date
JavaScript
7
star
68

go-application-framework

Framework for building client side applications like the Snyk CLI with its Extensions
Go
7
star
69

koa2-bunyan-server

A structured logging example using koa2 and bunyan
JavaScript
6
star
70

go-httpauth

"Advanced" HTTP Authentication mechanisms to be used in the golang HTTP stack
Go
6
star
71

dev-null

FOR TESTING ONLY
6
star
72

snyk-hex-plugin

Elixir
6
star
73

rpm-parser

Produce a list of dependencies from an RPM database file
TypeScript
6
star
74

kubernetes-scanner

Collects data about Kubernetes resources for Snyk
Go
6
star
75

snyk-iac-aws-cdk

Snyk Infrastructure as Code Demo for AWS CDK
JavaScript
5
star
76

java-runtime-agent

Java runtime instrumentation
Java
5
star
77

config

Common config loader for snyk
TypeScript
5
star
78

snyk-cpp-plugin

Snyk CLI C/C++ plugin
TypeScript
5
star
79

code-sdk-java

Snyk Code Public API package in Java
Java
5
star
80

snyk-php-plugin

Basic Snyk CLI plugin for PHP support
TypeScript
5
star
81

cloud-config-parser

A utility library for finding issues in configuration files
TypeScript
5
star
82

snykwire

JavaScript
4
star
83

snyk-docker-analyzer

CLI for analyzing docker images (previous method, see snyk-docker-plugin)
Go
4
star
84

snyk-iac-cloudformation

Snyk Infrastructure as Code Cloudformation demo
4
star
85

snyk-nuget-plugin

Basic Snyk CLI plugin for .NET support
TypeScript
4
star
86

resolve-package

Resolves the location of a node package given a path
HTML
4
star
87

driftctl-docs

Docs site for driftctl
MDX
4
star
88

composer-lockfile-parser

Snyk composer.lock file parser
TypeScript
4
star
89

press-kit

Snyk's press kit
4
star
90

snyk-to-jira

Shell script to convert Snyk issues to JIRA tickets
Shell
4
star
91

try-require

Snyk package loading system with policy detection
JavaScript
3
star
92

follow-npm

Simple cli tool that prints package@version to stdout
JavaScript
3
star
93

snyk-bazel-plugin

Basic Snyk CLI plugin for Bazel support
TypeScript
3
star
94

cli-extension-sbom

Go
3
star
95

snyk-cocoapods-plugin

Basic Snyk CLI plugin for CocoaPods support
TypeScript
3
star
96

broker-snyk-client-example

An example of the old-style broker configuration. Please read the newer docs.
3
star
97

nuget-semver

A semver parser that uses nuget semantics with node-semver's api
JavaScript
2
star
98

test-pug

Ruby
2
star
99

spring-bean-printer

Java
2
star
100

clojure-manifest-parser

WIP
TypeScript
2
star