CVE-2018-8009: Hadoop main Path Traversal Vulnerability
HIGHCVE-2018-8009 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Hadoop main libraries in the Maven ecosystem. The issue involves path traversal in hadoop. Remediation is available by upgrading affected packages to version 3.1.1, 3.0.3, 2.9.2, 2.8.5, 2.7.7.
CVE-2018-8009 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-8009
To remediate this vulnerability, upgrade all affected Hadoop main 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-main</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-main</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-main</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-main</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-main</artifactId>
<version>2.7.7</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-2018-8009, 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 main in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.1), 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 main, 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-2018-8009 Affected Hadoop main Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.hadoop:hadoop-main
|
Maven |
≥ 3.1.0
< 3.1.1
All 1 versions
3.1.0
|
3.1.1
|
|
org.apache.hadoop:hadoop-main
|
Maven |
≥ 3.0.0
< 3.0.3
|
3.0.3
|
|
org.apache.hadoop:hadoop-main
|
Maven |
≥ 2.9.0
< 2.9.2
|
2.9.2
|
|
org.apache.hadoop:hadoop-main
|
Maven |
≥ 2.8.0
< 2.8.5
|
2.8.5
|
|
org.apache.hadoop:hadoop-main
|
Maven |
< 2.7.7
|
2.7.7
|
References
Frequently Asked Questions
What is CVE-2018-8009?
Which Hadoop main versions are affected?
What version fixes CVE-2018-8009?
Is hadoop-main affected?
What is the CVSS score of CVE-2018-8009?
What CWE is associated with CVE-2018-8009?
How can I check Maven dependencies for CVE-2018-8009?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6x48-j4x4-cqw3",
"modified" : "2024-03-04T22:55:10Z",
"published" : "2018-12-21T17:50:29Z",
"aliases" : [ "CVE-2018-8009" ],
"summary" : "Path Traversal in Hadoop",
"details" : "Apache Hadoop 3.1.0, 3.0.0-alpha to 3.0.2, 2.9.0 to 2.9.1, 2.8.0 to 2.8.4, 2.0.0-alpha to 2.7.6, 0.23.0 to 0.23.11 is exploitable via the zip slip vulnerability in places that accept a zip file.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.1.0"
}, {
"fixed" : "3.1.1"
} ]
} ],
"versions" : [ "3.1.0" ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.9.0"
}, {
"fixed" : "2.9.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.8.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hadoop:hadoop-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-8009"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commit/12258c7cff8d32710fbd8b9088a930e3ce27432"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commit/45a1c680c276c4501402f7bc4cebcf85a6fbc7f"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commit/65e55097da2bb3f2fbdf9ba1946da25fe58bec9"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commit/6a4ae6f6eeed1392a4828a5721fa1499f65bdde"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hadoop/commit/fc4c20fc3469674cb584a4fb98bac7e3c2277c9"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:3892"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-6x48-j4x4-cqw3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/hadoop"
}, {
"type" : "WEB",
"url" : "https://hadoop.apache.org/cve_list.html#cve-2018-8009-http-cve-mitre-org-cgi-bin-cvename-cgi-name-cve-2018-8009-zip-slip-impact-on-apache-hadoop"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/a1c227745ce30acbcf388c5b0cc8423e8bf495d619cd0fa973f7f38d@%3Cuser.hadoop.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4dddf1705dbedfa94392913b2dad1cd2d1d89040facd389eea0b3510@%3Ccommits.druid.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rb21df54a4e39732ce653d2aa5672e36a792b59eb6717f2a06bb8d02a@%3Ccommits.druid.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://snyk.io/research/zip-slip-vulnerability"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/105927"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:20:31Z",
"nvd_published_at" : null
}
}