CVE-2021-25642 Apache Hadoop YARN remote code execution in ZKConfigurationStore of capacity scheduler
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.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.hadoop:hadoop-yarn-server Maven | All versions | 2.10.2 |
org.apache.hadoop:hadoop-yarn-server Maven | All versions | 2.10.2 |
org.apache.hadoop:hadoop-yarn-server Maven | From 3.0.0 | 3.2.4 |
org.apache.hadoop:hadoop-yarn-server Maven | From 3.0.0 | 3.2.4 |
org.apache.hadoop:hadoop-yarn-server Maven | From 3.3.0 | 3.3.4 |
org.apache.hadoop:hadoop-yarn-server Maven | From 3.3.0 | 3.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.
Other vulnerabilities in Apache Hadoop
- CVE-2022-25168 Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar
- CVE-2021-37404 Heap buffer overflow in libhdfs native library
- CVE-2022-26612 Arbitrary file write in FileUtil#unpackEntries on Windows
- CVE-2019-17195 Improper Check for Unusual or Exceptional Conditions in Connect2id Nimbus JOSE+JWT
- CVE-2017-15718 Exposure of Sensitive Information in Hadoop
Sources
Also known as GHSA-rr2m-gffv-mgrj.