Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security //

Open Source

6/8/2018
08:05 AM
Larry Loeb
Larry Loeb
Larry Loeb
50%
50%

ZipSlip Flaw Lets Attackers Inject Malware Into Open Source Projects

The newly discovered ZipSlip flaw opens a big hole for malware in many open source projects. Here's what developers need to know.

Malware authors are so doggone creative. They find flaws in software that should be boring and stolid enough to avoid being exploited -- and then exploit them, anyway.

ZipSlip is an exploit like that.

It was first found by Snyk and disclosed on its website. The malware affects major archival formats such as ar, jar, war, cpio, apk, rar and 7z. Researchers report that it can be exploited on both client (user) machines and servers.

It's a way for an attacker to feed a poisoned archival file to a user, which allows them to write arbitrary files on the system that may end up with remote command execution.

Who would think unpacking a file could do that? Well, it can.

The vulnerability is exploited using a specially crafted archive that holds directory traversal filenames such as "../../evil.sh." With it, an attacker can unzip files outside the normal unzip path and then overwrite sensitive files such as critical OS libraries.

Programming languages, including JavaScript, Python, Ruby, .NET, Go, and Groovy, don't have an official archive for files and that makes developers do the unpacking on their own by using alternative libraries.

These libraries can be ZipSlip vulnerable, and Snyk published a list of affected open source libraries on GitHub. (See Microsoft's GitHub Deal: Following Developers & Security Into the Cloud.)

Snyk found that Java was the most affected programming language. The Oracle and Apache commons-compress APIs do offer some archiving support but do not publicly provide full extract capability. Java has no central library that offers high level processing of archive files. Snyk details that the lack of such a library led to vulnerable code snippets being hand-crafted and shared among developer communities like StackOverflow.

The effect on these libraries -- though many of them were fixed before Snyk disclosed -- can have a significant impact on many existing projects. Snyk found that Oracle, Amazon, Spring/Pivotal, Linkedin, Twitter, Alibaba, Jenkinsci, Eclipse, OWASP, SonarCube, OpenTable, Arduino, ElasticSearch, Selenium, Gradle and JetBrains all used the libraries or had vulnerable code within them that could be exploited.


Now entering its fifth year, the 2020 Vision Executive Summit is an exclusive meeting of global CSP executives focused on navigating the disruptive forces at work in telecom today. Join us in Lisbon on December 4-6 to meet with fellow experts as we define the future of next-gen communications and how to make it profitable.

The problem seems to not affect Ruby or Python. Snyk researchers noted:

We also vetted the Ruby and Python ecosystems and couldn't find any vulnerable code snippets or libraries. In fact, Python's zipfile was vulnerable until it was fixed in 2014. Ruby has a number of existing vulnerabilities that have been fixed in previous versions.

The way out of this may be to add validation code to a vulnerable snippet to test for directory traversal. If found, one must make sure to use the fixed libraries that Snyk has listed on GitHub. That process of finding out dependencies is a major pain, though.

The subtlety of the exploit and the lack of wide awareness of it make it a major security challenge for the enterprise. Though mediation will require some effort, the depth of the problem will make it rewarding.

Related posts:

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 10/23/2020
7 Tips for Choosing Security Metrics That Matter
Ericka Chickowski, Contributing Writer,  10/19/2020
Russian Military Officers Unmasked, Indicted for High-Profile Cyberattack Campaigns
Kelly Jackson Higgins, Executive Editor at Dark Reading,  10/19/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
Special Report: Computing's New Normal
This special report examines how IT security organizations have adapted to the "new normal" of computing and what the long-term effects will be. Read it and get a unique set of perspectives on issues ranging from new threats & vulnerabilities as a result of remote working to how enterprise security strategy will be affected long term.
Flash Poll
How IT Security Organizations are Attacking the Cybersecurity Problem
How IT Security Organizations are Attacking the Cybersecurity Problem
The COVID-19 pandemic turned the world -- and enterprise computing -- on end. Here's a look at how cybersecurity teams are retrenching their defense strategies, rebuilding their teams, and selecting new technologies to stop the oncoming rise of online attacks.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-24847
PUBLISHED: 2020-10-23
A Cross-Site Request Forgery (CSRF) vulnerability is identified in FruityWifi through 2.4. Due to a lack of CSRF protection in page_config_adv.php, an unauthenticated attacker can lure the victim to visit his website by social engineering or another attack vector. Due to this issue, an unauthenticat...
CVE-2020-24848
PUBLISHED: 2020-10-23
FruityWifi through 2.4 has an unsafe Sudo configuration [(ALL : ALL) NOPASSWD: ALL]. This allows an attacker to perform a system-level (root) local privilege escalation, allowing an attacker to gain complete persistent access to the local system.
CVE-2020-5990
PUBLISHED: 2020-10-23
NVIDIA GeForce Experience, all versions prior to 3.20.5.70, contains a vulnerability in the ShadowPlay component which may lead to local privilege escalation, code execution, denial of service or information disclosure.
CVE-2020-25483
PUBLISHED: 2020-10-23
An arbitrary command execution vulnerability exists in the fopen() function of file writes of UCMS v1.4.8, where an attacker can gain access to the server.
CVE-2020-5977
PUBLISHED: 2020-10-23
NVIDIA GeForce Experience, all versions prior to 3.20.5.70, contains a vulnerability in NVIDIA Web Helper NodeJS Web Server in which an uncontrolled search path is used to load a node module, which may lead to code execution, denial of service, escalation of privileges, and information disclosure.