Loading HuntDB...

GHSA-8wm5-8h9c-47pc

GitHub Security Advisory

Apache Hadoop argument injection vulnerability

✓ GitHub Reviewed CRITICAL Has CVE

Advisory Details

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

Affected Packages

Maven org.apache.hadoop:hadoop-common
Affected versions: 2.0.0 (fixed in 2.10.2)
Maven org.apache.hadoop:hadoop-common
Affected versions: 3.0.0-alpha (fixed in 3.2.4)
Maven org.apache.hadoop:hadoop-common
Affected versions: 3.3.0 (fixed in 3.3.3)

Related CVEs

Key Information

GHSA ID
GHSA-8wm5-8h9c-47pc
Published
August 5, 2022 12:00 AM
Last Modified
August 11, 2022 9:14 PM
CVSS Score
9.0 /10
Primary Ecosystem
Maven
Primary Package
org.apache.hadoop:hadoop-common
GitHub Reviewed
✓ Yes

Dataset

Last updated: July 28, 2025 6:37 AM

Data from GitHub Advisory Database. This information is provided for research and educational purposes.