CVE-2021-25642 Apache Hadoop YARN remote code execution in ZKConfigurationStore of capacity scheduler

High 8.8 Published Updated

An attacker with ZooKeeper access can execute arbitrary commands via unsafe deserialization in Hadoop YARN's optional ZKConfigurationStore.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-25642?

CVE-2021-25642 is a high-severity unsafe deserialization vulnerability in Apache Hadoop, published on 25 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-502

Which versions are affected by CVE-2021-25642?

6 open source packages ship an affected version, including org.apache.hadoop:hadoop-yarn-server. It affects 1 product.

PackageAffectedFixed in
org.apache.hadoop:hadoop-yarn-server MavenAll versions2.10.2
org.apache.hadoop:hadoop-yarn-server MavenAll versions2.10.2
org.apache.hadoop:hadoop-yarn-server MavenFrom 3.0.03.2.4
org.apache.hadoop:hadoop-yarn-server MavenFrom 3.0.03.2.4
org.apache.hadoop:hadoop-yarn-server MavenFrom 3.3.03.3.4
org.apache.hadoop:hadoop-yarn-server MavenFrom 3.3.03.3.4

Products include Apache Hadoop.

How do I fix CVE-2021-25642?

Upgrade org.apache.hadoop:hadoop-yarn-server to a fixed version for your release line: 2.10.2, 3.2.4 or 3.3.4.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2021-25642 being exploited?

There is no known exploitation of CVE-2021-25642 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-rr2m-gffv-mgrj.

Is CVE-2021-25642 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free