CVE-2018-8009: Hadoop main Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-6x48-j4x4-cqw3
CVSS 8.8
CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2018-8009
GHSA Identifier GHSA-6x48-j4x4-cqw3
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Hadoop main
Package Ecosystem Maven
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

org.apache.hadoop:hadoop-main fixed: 3.1.1
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-main</artifactId>
    <version>3.1.1</version>
</dependency>
org.apache.hadoop:hadoop-main fixed: 3.0.3
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-main</artifactId>
    <version>3.0.3</version>
</dependency>
org.apache.hadoop:hadoop-main fixed: 2.9.2
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-main</artifactId>
    <version>2.9.2</version>
</dependency>
org.apache.hadoop:hadoop-main fixed: 2.8.5
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-main</artifactId>
    <version>2.8.5</version>
</dependency>
org.apache.hadoop:hadoop-main fixed: 2.7.7
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-main</artifactId>
    <version>2.7.7</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2018-8009 Affected Hadoop main Versions

5 component(s)
Fixed Versions:
3.1.13.0.32.9.22.8.52.7.7
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

NVD — CVE-2018-8009 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-8009
Security Fix Commit FIX COMMIT
https://github.com/apache/hadoop/commit/12258c7cff8d32710fbd8b9088a930e3ce27432
Security Fix Commit FIX COMMIT
https://github.com/apache/hadoop/commit/45a1c680c276c4501402f7bc4cebcf85a6fbc7f
Security Fix Commit FIX COMMIT
https://github.com/apache/hadoop/commit/65e55097da2bb3f2fbdf9ba1946da25fe58bec9
Security Fix Commit FIX COMMIT
https://github.com/apache/hadoop/commit/6a4ae6f6eeed1392a4828a5721fa1499f65bdde
Security Fix Commit FIX COMMIT
https://github.com/apache/hadoop/commit/fc4c20fc3469674cb584a4fb98bac7e3c2277c9
access.redhat.com/errata/rhsa-2019:38... WEB
https://access.redhat.com/errata/RHSA-2019:3892
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-6x48-j4x4-cqw3
Hadoop main Source Repository REPOSITORY
https://github.com/apache/hadoop
hadoop.apache.org/cve_list.html WEB
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
lists.apache.org/thread.html/708d941... WEB
https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E
lists.apache.org/thread.html/a1c2277... WEB
https://lists.apache.org/thread.html/a1c227745ce30acbcf388c5b0cc8423e8bf495d619cd0fa973f7f38d@%3Cuser.hadoop.apache.org%3E
lists.apache.org/thread.html/r4dddf1... WEB
https://lists.apache.org/thread.html/r4dddf1705dbedfa94392913b2dad1cd2d1d89040facd389eea0b3510@%3Ccommits.druid.apache.org%3E
lists.apache.org/thread.html/rb21df5... WEB
https://lists.apache.org/thread.html/rb21df54a4e39732ce653d2aa5672e36a792b59eb6717f2a06bb8d02a@%3Ccommits.druid.apache.org%3E
snyk.io/research/zip-slip-v... WEB
https://snyk.io/research/zip-slip-vulnerability
Hadoop main Security Information SECURITY
http://www.securityfocus.com/bid/105927

Frequently Asked Questions

What is CVE-2018-8009?
CVE-2018-8009 is a security vulnerability in Hadoop main involving Path Traversal in Hadoop under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Hadoop main versions are affected?
Affected versions include releases prior to 3.1.1, 3.0.3, 2.9.2, 2.8.5, 2.7.7 across affected packages: org.apache.hadoop:hadoop-main.
What version fixes CVE-2018-8009?
Upgrading to 3.1.1, 3.0.3, 2.9.2, 2.8.5, 2.7.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hadoop-main affected?
Yes, org.apache.hadoop:hadoop-main is affected in releases prior to 3.1.1, 3.0.3, 2.9.2, 2.8.5, 2.7.7. Upgrade your dependency to 3.1.1, 3.0.3, 2.9.2, 2.8.5, 2.7.7 or later.
What is the CVSS score of CVE-2018-8009?
CVE-2018-8009 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-8009?
CVE-2018-8009 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check Maven dependencies for CVE-2018-8009?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.hadoop'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}