Bug 2119084 (CVE-2022-25168) - CVE-2022-25168 hadoop: Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar
Summary: CVE-2022-25168 hadoop: Command injection in org.apache.hadoop.fs.FileUtil.unT...
Status: NEW
Alias: CVE-2022-25168
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 2119085 2119086
Blocks: 2115731
TreeView+ depends on / blocked
Reported: 2022-08-17 13:34 UTC by Patrick Del Bello
Modified: 2022-08-18 18:31 UTC (History)
64 users (show)

Fixed In Version: hadoop-commons 2.10.2, hadoop-commons 3.2.4, apache hadoop 3.3.3
Doc Type: ---
Doc Text:
A flaw was found in the hadoop-common package. This flaw allows an attacker to benefit from command injection using the org.apache.hadoop.fs.FileUtil.unTarUsingTar function.
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Patrick Del Bello 2022-08-17 13:34:04 UTC
Apache Hadoop's FileUtil.unTar(File, File) API does not escape the input file name before being passed to the shell. An attacker can inject arbitrary commands. This is only used in Hadoop 3.3 InMemoryAliasMap.completeBootstrapTransfer, which is only ever run by a local user. It has been used in Hadoop 2.x for yarn localization, which does enable remote code execution. It is used in Apache Spark, from the SQL command ADD ARCHIVE. As the ADD ARCHIVE command adds new binaries to the classpath, being able to execute shell scripts does not confer new permissions to the caller. SPARK-38305. "Check existence of file before untarring/zipping", which is included in 3.3.0, 3.1.4, 3.2.2, prevents shell commands being executed, regardless of which version of the hadoop libraries are in use. Users should upgrade to Apache Hadoop 2.10.2, 3.2.4, 3.3.3 or upper (including HADOOP-18136).


Comment 1 Patrick Del Bello 2022-08-17 13:34:36 UTC
Created hadoop tracking bugs for this issue:

Affects: epel-all [bug 2119086]
Affects: fedora-all [bug 2119085]

Note You need to log in before you can comment on or make changes to this bug.