CVE-2018-17297 Unzip function in ZipUtil.java in Hutool allows remote attackers to overwrite arbitrary files via directory traversal

High 7.5 Published Updated

Remote attackers can overwrite arbitrary files via directory traversal in ZIP archives using the Hutool library's unzip function.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-17297?

CVE-2018-17297 is a high-severity path traversal vulnerability in n/a, published on 21 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The unzip function in ZipUtil.java in Hutool before 4.1.12 allows remote attackers to overwrite arbitrary files via directory traversal sequences in a filename within a ZIP archive.

Weakness: CWE-22

Which versions are affected by CVE-2018-17297?

6 open source packages ship an affected version, including cn.hutool:hutool-all, cn.hutool:hutool-core and cn.hutool:hutool-parent. It affects 1 product.

PackageAffectedFixed in
cn.hutool:hutool-all MavenAll versions4.1.12
cn.hutool:hutool-all MavenAll versions4.1.12
cn.hutool:hutool-core MavenAll versions4.1.12
cn.hutool:hutool-core MavenAll versions4.1.12
cn.hutool:hutool-parent MavenAll versions4.1.12
cn.hutool:hutool-parent MavenAll versions4.1.12

Products include Hutool Hutool.

How do I fix CVE-2018-17297?

Upgrade cn.hutool:hutool-all to 4.1.12 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2018-17297 being exploited?

There is no known exploitation of CVE-2018-17297 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-rhq2-2574-78mc.

Is CVE-2018-17297 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free