Vulnerability · Published Apr 7, 2022 · Assigned by apache
CVE-2022-26612Arbitrary file write in FileUtil#unpackEntries on Windows
Critical 9.8
In plain English
A critical-severity security flaw in Apache Hadoop from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.2% (higher than 91% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In Apache Hadoop, The unTar function uses unTarUsingJava function on Windows and the built-in tar utility on Unix and other OSes. As a result, a TAR entry may create a symlink under the expected extraction directory which points to an external directory. A subsequent TAR entry may extract an arbitrary file into the external directory using the symlink name. This however would be caught by the same targetDirPath check on Unix because of the getCanonicalPath call. However on Windows, getCanonicalPath doesn't resolve symbolic links, which bypasses the check. unpackEntries during TAR extraction follows symbolic links which allows writing outside expected base directory on Windows. This was addressed in Apache Hadoop 3.2.3
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.apache.hadoop:hadoop-common | 3.2.3 | GHSA-gx2c-fvhc-ph4j |
| Maven | org.apache.hadoop:hadoop-common | 2.10.2 | GHSA-gx2c-fvhc-ph4j |
| Maven | org.apache.hadoop:hadoop-common | 3.3.3 | GHSA-gx2c-fvhc-ph4j |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Hadoop | unspecified – before 3.2.33.3.13.3.2 |
References
- https://lists.apache.org/thread/hslo7wzw2449gv1jyjk8g6ttd7935fyz x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220519-0004/ x_refsource_CONFIRM