cve.bz

CVE-2022-25168 apache hadoop: OS Command Injection

9.8 criticalEPSS 4.6%Fix available

Critical (9.8) in apache hadoop. EPSS 4.6% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.hadoop:hadoop-common 2.10.2, 3.2.4, 3.3.3.

On this page
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).

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
4.6% (unchanged from 4.6% a week ago; 4.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-25168 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-25168?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-25168?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-25168 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
apache:hadoopfrom 2.0.0 through 2.10.1
apache:hadoopfrom 3.0.0 through 3.2.3
apache:hadoopfrom 3.3.0 through 3.3.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8wm5-8h9c-47pcMavenorg.apache.hadoop:hadoop-common>=2.0.0 <2.10.22.10.2
GHSA-8wm5-8h9c-47pcMavenorg.apache.hadoop:hadoop-common>=3.0.0-alpha <3.2.43.2.4
GHSA-8wm5-8h9c-47pcMavenorg.apache.hadoop:hadoop-common>=3.3.0 <3.3.33.3.3

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
A-MQ Clients 2hadoopNot affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/volsync-mover-rclone-rhel8Not affected
Red Hat AMQ Broker 7hadoopNot affected
Red Hat Data Grid 8hadoopNot affected
Red Hat Fuse 7hadoopNot affected
Red Hat Integration Camel K 1hadoopFix deferred
Red Hat Integration Camel Quarkus 1hadoopNot affected
Red Hat Integration Data Virtualisation OperatorhadoopOut of support scope
Red Hat JBoss Data Grid 7hadoopOut of support scope
Red Hat JBoss Data Virtualization 6hadoopOut of support scope
Red Hat JBoss Enterprise Application Platform 7hadoop-coreNot affected
Red Hat JBoss Enterprise Application Platform Expansion PackhadoopNot affected
Red Hat JBoss Fuse 6hadoopOut of support scope
Red Hat JBoss Fuse Service Works 6hadoopOut of support scope
Red Hat JBoss Operations Network 3hadoopOut of support scope
Red Hat OpenShift Container Platform 4openshift4/ose-metering-hadoopAffected
streams for Apache KafkahadoopNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-25168.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON