CVE-2018-17297
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Hutool before 4.1.12 allows arbitrary file overwrite via directory traversal in ZIP entries.
Vulnerability
The unzip function in ZipUtil.java of Hutool (versions prior to 4.1.12) does not validate or sanitize file names extracted from a ZIP archive. Specifically, the method zipEntry.getName() is used directly without checking for directory traversal sequences such as ../ or ..\\. This allows an archive containing entries with crafted paths to write files outside the intended extraction directory. The affected packages include cn.hutool:hutool-all, cn.hutool:hutool-core, and cn.hutool:hutool-parent [1][3].
Exploitation
An attacker needs to supply a malicious ZIP archive containing files with path names that include directory traversal sequences (e.g., ../../evil.txt). If a user or system using a vulnerable version of Hutool extracts this archive via the unzip method, the library will write the entry’s content to the resolved path on the filesystem. No authentication or special privileges are required beyond the ability to deliver the ZIP file to the extraction process [2][4].
Impact
Successful exploitation allows an attacker to overwrite arbitrary files on the target system with the content of the malicious ZIP entry. This can lead to overwriting sensitive configuration files, application binaries, or deployed web shells. The impact depends on the writable paths accessible to the process performing the extraction; in the worst case, this can lead to remote code execution if critical executable or script files are replaced [4].
Mitigation
The vulnerability is fixed in Hutool version 4.1.12 and later. Users should upgrade to at least this version. There is no known workaround for older versions other than avoiding the use of the unzip function with untrusted ZIP archives or applying external input validation. The fix was released on October 17, 2018 [3].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
cn.hutool:hutool-parentMaven | < 4.1.12 | 4.1.12 |
cn.hutool:hutool-allMaven | < 4.1.12 | 4.1.12 |
cn.hutool:hutool-coreMaven | < 4.1.12 | 4.1.12 |
Affected products
3- ghsa-coords3 versions
< 4.1.12+ 2 more
- (no CPE)range: < 4.1.12
- (no CPE)range: < 4.1.12
- (no CPE)range: < 4.1.12
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-rhq2-2574-78mcghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2018-17297ghsaADVISORY
- github.com/looly/hutool/issues/162ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.