CVE-2022-26612: Hadoop common Path Traversal Vulnerability
CRITICALCVE-2022-26612 is a CRITICAL (CVSS 9.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Hadoop common libraries in the Maven ecosystem. The issue involves path traversal in hadoop. Remediation is available by upgrading affected packages to version 3.2.3, 2.10.2, 3.3.3.
CVE-2022-26612 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-26612
To remediate this vulnerability, upgrade all affected Hadoop common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>3.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.10.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>3.3.3</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.hadoop
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-26612, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.hadoop
Analyze the terminal output to locate any version of Hadoop common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.hadoop command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Hadoop common, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-26612 Affected Hadoop common Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.hadoop:hadoop-common
|
Maven |
≥ 3.2.0
< 3.2.3
|
3.2.3
|
|
org.apache.hadoop:hadoop-common
|
Maven |
< 2.10.2
|
2.10.2
|
|
org.apache.hadoop:hadoop-common
|
Maven |
≥ 3.3.0
< 3.3.3
|
3.3.3
|
References
Frequently Asked Questions
What is CVE-2022-26612?
Which Hadoop common versions are affected?
What version fixes CVE-2022-26612?
Is hadoop-common affected?
What is the CVSS score of CVE-2022-26612?
What CWE is associated with CVE-2022-26612?
How can I check Maven dependencies for CVE-2022-26612?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gx2c-fvhc-ph4j",
"modified" : "2025-10-01T14:24:45Z",
"published" : "2022-04-08T00:00:21Z",
"aliases" : [ "CVE-2022-26612" ],
"summary" : "Path traversal in Hadoop",
"details" : "In Apache Hadoop, The unTar function uses unTarUsingJava function on Windows and the built-in tar utility on Unix and other OSes. As a result, a TAR entry may create a symlink under the expected extraction directory which points to an external directory. A subsequent TAR entry may extract an arbitrary file into the external directory using the symlink name. This however would be caught by the same targetDirPath check on Unix because of the getCanonicalPath call. However on Windows, getCanonicalPath doesn't resolve symbolic links, which bypasses the check. unpackEntries during TAR extraction follows symbolic links which allows writing outside expected base directory on Windows. This was addressed in Apache Hadoop 2.10.2, 3.2.3, 3.3.3, and 3.4.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.3.0"
}, {
"fixed" : "3.3.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-26612"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/hadoop"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commits/rel/release-2.10.2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commits/rel/release-3.2.3/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commits/rel/release-3.3.3/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commits/rel/release-3.4.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/HADOOP-18317"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/hslo7wzw2449gv1jyjk8g6ttd7935fyz"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220519-0004"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-08T22:06:47Z",
"nvd_published_at" : "2022-04-07T19:15:00Z"
}
}