Vulnerabilities in pkg:maven/org.apache.hadoop/hadoop-yarn-server

PACKAGE
Advisory Identifier: GHSA-rr2m-gffv-mgrj
Advisory Summary

CVE-2021-25642 is a HIGH (CVSS 8.8) deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Hadoop yarn server libraries in the Maven ecosystem. The issue involves deserialization of untrusted data in apache hadoop yarn. Remediation is available by upgrading affected packages to version 2.10.2, 3.2.4, 3.3.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.hadoop/hadoop-yarn-server

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.hadoop/hadoop-yarn-server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rr2m-gffv-mgrj CVE-2021-25642 HIGH Deserialization of Untrusted Data in Apache Hadoop YARN

CVE-2021-25642 at a Glance

CVE Identifier CVE-2021-25642
GHSA Identifier GHSA-rr2m-gffv-mgrj
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Hadoop yarn server
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.1/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-2021-25642

To remediate this vulnerability, upgrade all affected Hadoop yarn server 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-yarn-server fixed: 2.10.2
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-yarn-server</artifactId>
    <version>2.10.2</version>
</dependency>
org.apache.hadoop:hadoop-yarn-server fixed: 3.2.4
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-yarn-server</artifactId>
    <version>3.2.4</version>
</dependency>
org.apache.hadoop:hadoop-yarn-server fixed: 3.3.4
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-yarn-server</artifactId>
    <version>3.3.4</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-2021-25642, 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 yarn server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.2), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Hadoop yarn server, 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

ZKConfigurationStore which is optionally used by CapacityScheduler of Apache Hadoop YARN deserializes data obtained from ZooKeeper without validation. An attacker having access to ZooKeeper can run arbitrary commands as YARN user by exploiting this. Users should upgrade to Apache Hadoop 2.10.2, 3.2.4, 3.3.4 or later (containing YARN-11126) if ZKConfigurationStore is used.

CVE-2021-25642 Affected Hadoop yarn server Versions

3 component(s)
Fixed Versions:
2.10.23.2.43.3.4
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.hadoop:hadoop-yarn-server
Maven
< 2.10.2
2.10.2
org.apache.hadoop:hadoop-yarn-server
Maven
≥ 3.0.0
< 3.2.4
3.2.4
org.apache.hadoop:hadoop-yarn-server
Maven
≥ 3.3.0
< 3.3.4
3.3.4

References

Frequently Asked Questions

What is CVE-2021-25642?
CVE-2021-25642 is a security vulnerability in Hadoop yarn server involving Deserialization of Untrusted Data in Apache Hadoop YARN under CWE-502: Deserialization of Untrusted Data.
Which Hadoop yarn server versions are affected?
Affected versions include releases prior to 2.10.2, 3.2.4, 3.3.4 across affected packages: org.apache.hadoop:hadoop-yarn-server.
What version fixes CVE-2021-25642?
Upgrading to 2.10.2, 3.2.4, 3.3.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hadoop-yarn-server affected?
Yes, org.apache.hadoop:hadoop-yarn-server is affected in releases prior to 2.10.2, 3.2.4, 3.3.4. Upgrade your dependency to 2.10.2, 3.2.4, 3.3.4 or later.
What is the CVSS score of CVE-2021-25642?
CVE-2021-25642 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-25642?
CVE-2021-25642 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2021-25642?
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-rr2m-gffv-mgrj",
  "modified" : "2022-09-08T14:13:04Z",
  "published" : "2022-08-26T00:03:33Z",
  "aliases" : [ "CVE-2021-25642" ],
  "summary" : "Deserialization of Untrusted Data in Apache Hadoop YARN",
  "details" : "ZKConfigurationStore which is optionally used by CapacityScheduler of Apache Hadoop YARN deserializes data obtained from ZooKeeper without validation. An attacker having access to ZooKeeper can run arbitrary commands as YARN user by exploiting this. Users should upgrade to Apache Hadoop 2.10.2, 3.2.4, 3.3.4 or later (containing YARN-11126) if ZKConfigurationStore is used.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/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-yarn-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.hadoop:hadoop-yarn-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.hadoop:hadoop-yarn-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-25642"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/hadoop/commit/5e2f4339fadc88f20543915fc9b0aaeaf4f9e7bf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/hadoop"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/g6vf2h4wdgzzdgk91mqozhs58wotq150"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20221201-0003"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-30T20:55:27Z",
    "nvd_published_at" : "2022-08-25T14:15:00Z"
  }
}