You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently discovered that the patch for the historical vulnerability CVE-2018-1002201 in zt-zip is incomplete.
zt-zip added the following checks to restrict arbitrary malicious file creation and writing:
+ if (name.indexOf("..") != -1 && !destFile.getCanonicalPath().startsWith(outputDir.getCanonicalPath())) {
+ throw new MaliciousZipException(outputDir, name);
+ }
However, an attacker could craft a malicious request to bypass this patch. For security reasons, we are not providing the specific exploit here. As a reference, a similar incomplete fix occurred in Tomcat. CVE-2020-9484 used the same method to address the vulnerability, but CVE-2021-25329 exposed the shortcomings of that fix.
- if (!file.getCanonicalPath().startsWith(storageDir.getCanonicalPath())) {
+ if (!file.getCanonicalFile().toPath().startsWith(storageDir.getCanonicalFile().toPath())) {
Promblem Statement
We recently discovered that the patch for the historical vulnerability CVE-2018-1002201 in zt-zip is incomplete.
zt-zip added the following checks to restrict arbitrary malicious file creation and writing:
However, an attacker could craft a malicious request to bypass this patch. For security reasons, we are not providing the specific exploit here. As a reference, a similar incomplete fix occurred in Tomcat. CVE-2020-9484 used the same method to address the vulnerability, but CVE-2021-25329 exposed the shortcomings of that fix.
The patch for CVE-2020-9484(apache/tomcat@bb33048#diff-d2801d6b9c9ff6f98a6871accb7e61499ed3899f5234028997387ad65906e5e7):
The patch for CVE-2021-25329(apache/tomcat@6d66e99)
Recommended Fix (pr##158)
The text was updated successfully, but these errors were encountered: