Skip to content
Fencer Vulns
critical 9.8

CVE-2022-25168 json

Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar

published 2022-08-04 4 y ago modified 2026-06-17 4 mo ago also GHSA-8wm5-8h9c-47pc , EUVD-2022-6521

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.6%
EPSS 4.6% chance of exploitation in 30 days, percentile 91%
public exploits
0
none known

Summary

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

Patch / fix

  • maven org.apache.hadoop:hadoop-common 2.10.2, 3.2.4, 3.3.3

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-25168 updated cvss 9.8

hadoop: Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar

  • Red Hat Integration Camel K 1 hadoop hadoop
    affected: no fix available “Fix deferred”
  • Red Hat Integration Data Virtualisation Operator hadoop hadoop Red Hat JBoss Data Grid 7 hadoop hadoop Red Hat JBoss Data Virtualization 6 hadoop hadoop Red Hat JBoss Fuse 6 hadoop hadoop Red Hat JBoss Fuse Service Works 6 hadoop hadoop Red Hat JBoss Operations Network 3 hadoop hadoop
    affected: no fix planned “Out of support scope”
  • Red Hat OpenShift Container Platform 4 openshift4/ose-metering-hadoop
    affected: no fix available
  • Red Hat A-MQ Clients 2 hadoop hadoop Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/volsync-mover-rclone-rhel8 Red Hat AMQ Broker 7 hadoop hadoop Red Hat Data Grid 8 hadoop hadoop Red Hat Fuse 7 hadoop hadoop Red Hat Integration Camel Quarkus 1 hadoop hadoop
    +3 more products
    Red Hat JBoss Enterprise Application Platform 7 hadoop-core Red Hat JBoss Enterprise Application Platform Expansion Pack hadoop hadoop Red Hat streams for Apache Kafka hadoop hadoop
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.59% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.apache.hadoop:hadoop-common
>=2.0.0, <2.10.2
>=3.0.0-alpha, <3.2.4
>=3.3.0, <3.3.3
2.10.2
3.2.4
3.3.3

Affected products

  • Apache Software Foundation Apache Hadoop

Classification

Weakness
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.