CVE-2018-1002202 Improper Limitation of a Pathname to a Restricted Directory in Zip4j
Attackers can write arbitrary files via malicious Zip entries, potentially leading to code execution or data modification in applications using zip4j.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2018-1002202?
CVE-2018-1002202 is a medium-severity path traversal vulnerability in zip4j, published on 25 Jul 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
zip4j before 1.3.3 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as 'Zip-Slip'.
Weakness: CWE-22
Which versions are affected by CVE-2018-1002202?
2 open source packages ship an affected version, including net.lingala.zip4j:zip4j. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
net.lingala.zip4j:zip4j Maven | All versions | 1.3.3 |
net.lingala.zip4j:zip4j Maven | All versions | 1.3.3 |
Products include Zip4j Project Zip4j.
How do I fix CVE-2018-1002202?
Upgrade net.lingala.zip4j:zip4j to 1.3.3 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2018-1002202 being exploited?
There is no known exploitation of CVE-2018-1002202 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in zip4j
Sources
Also known as GHSA-2rpm-4x8c-pvqg.