Apache Hadoop argument injection vulnerability
Critical9.8CVE-2022-25168 · Published Aug 5, 2022 · updated Feb 21, 2024
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| org.apache.hadoop:hadoop-common Maven | >= 2.0.0, < 2.10.2 | 2.10.2 |
| >= 3.0.0-alpha, < 3.2.4 | 3.2.4 | |
| >= 3.3.0, < 3.3.3 | 3.3.3 |
Details and references
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).
More Apache Hadoop advisories
All Apache Hadoop| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jun 142022 | Apache Hadoop heap overflow before v2.10.2, v3.2.3, v3.3.2 CVE-2021-37404Critical9.8fixed in 2.10.2, 3.2.3, 3.3.2 | Critical9.8 | 2.10.2, 3.2.3, 3.3.2 |
| May 172022 | Exposure of Sensitive Information to an Unauthorized Actor in Apache Hadoop CVE-2015-1776Medium6.2fixed in 2.6.5 | Medium6.2 | 2.6.5 |
| May 172022 | Improper Access Control in Apache Hadoop CVE-2016-5393High8.8fixed in 2.6.5, 2.7.3 | High8.8 | 2.6.5, 2.7.3 |
| May 172022 | Improper Authentication in Apache Hadoop CVE-2013-2192Lowfixed in 0.23.9, 2.0.6-alpha | Low | 0.23.9, 2.0.6-alpha |
| May 172022 | Improper Authentication in Apache Hadoop CVE-2014-0229Medium6.5fixed in 0.23.11, 2.4.1 | Medium6.5 | 0.23.11, 2.4.1 |
| May 172022 | Apache Hadoop's LinuxContainerExecutor runs docker commands as root with insufficient input validation CVE-2017-7669High7.5fixed in 2.8.1, 3.0.0-alpha3 | High7.5 | 2.8.1, 3.0.0-alpha3 |