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...
Keywords:
Status: NEW
Alias: CVE-2022-25168
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2119086 2119085
Blocks: 2115731
TreeView+ depends on / blocked
 
Reported: 2022-08-17 13:34 UTC by Patrick Del Bello
Modified: 2023-10-25 17:21 UTC (History)
59 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:
Environment:
Last Closed:
Embargoed:


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).

https://lists.apache.org/thread/mxqnb39jfrwgs3j6phwvlrfq4mlox130

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.