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.

Severity (CVSS NVD)9.8Critical
Exploit odds (30 days)4.2%top 8.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Mavenorg.apache.hadoop:hadoop-common3.2.3GHSA-gx2c-fvhc-ph4j
Mavenorg.apache.hadoop:hadoop-common2.10.2GHSA-gx2c-fvhc-ph4j
Mavenorg.apache.hadoop:hadoop-common3.3.3GHSA-gx2c-fvhc-ph4j

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache Hadoop unspecified – before 3.2.33.3.13.3.2

References