ZipSlip Flaw Lets Attackers Inject Malware Into Open Source Projects

  /     /     /  
Publicated : 22/11/2024   Category : security


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. Heres 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.
Its 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.
(Source:
Snyk
)
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, dont 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
Microsofts 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 couldnt find any vulnerable code snippets or libraries. In fact, Pythons 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:
Public Cloud, Part of the Network or Not, Remains a Security Concern
Microsoft Offering GDPR-Like Protection for All Customers
Microsoft, Apple & Others Rush OS Patches Following Debugging Debacle
Microsofts 4-Step Plan for Eliminating Passwords
— Larry Loeb has written for many of the last centurys major dead tree computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Last News

▸ ArcSight prepares for future at user conference post HP acquisition. ◂
Discovered: 07/01/2025
Category: security

▸ Samsung Epic 4G: First To Use Media Hub ◂
Discovered: 07/01/2025
Category: security

▸ Many third-party software fails security tests ◂
Discovered: 07/01/2025
Category: security


Cyber Security Categories
Google Dorks Database
Exploits Vulnerability
Exploit Shellcodes

CVE List
Tools/Apps
News/Aarticles

Phishing Database
Deepfake Detection
Trends/Statistics & Live Infos



Tags:
ZipSlip Flaw Lets Attackers Inject Malware Into Open Source Projects