CVE-2022-26612

Arbitrary file write in FileUtil#unpackEntries on Windows

Published Apr 7, 2022 CVSS 3.1 · 9.8 Critical EPSS 4.2% KEV · Not listed
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

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-1748 Path traversal in Hadoop
Github GHSA Github GHSA GHSA-gx2c-fvhc-ph4j Path traversal in Hadoop
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Aug 3, 2024, 5:11 AM
Reserved
Mar 7, 2022, 12:00 AM
Status
Modified
Published
Apr 7, 2022, 7:15 PM
Modified
Jun 17, 2026, 4:35 AM
Severity
Important
Public date
Apr 7, 2022, 12:00 AM