CVE-2021-21341 XStream can cause a Denial of Service

High 7.5 Published Updated

Remote attackers can cause denial of service by consuming 100% CPU via manipulated XML input in XStream library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-21341?

CVE-2021-21341 is a high-severity denial of service vulnerability in Apache Activemq, published on 22 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is vulnerability which may allow a remote attacker to allocate 100% CPU time on the target system depending on CPU type or parallel execution of such a payload resulting in a denial of service only by manipulating the processed input stream. No user is affected who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.16.

Weakness: CWE-502, CWE-400

Which versions are affected by CVE-2021-21341?

3 open source packages ship an affected version, including activemq and com.thoughtworks.xstream:xstream. It affects 13 products.

PackageAffectedFixed in
activemq BitnamiAll versions to 5.16.05.15.14
com.thoughtworks.xstream:xstream MavenAll versions1.4.16
com.thoughtworks.xstream:xstream MavenAll versions1.4.16

Products include Apache Activemq, Apache Jmeter, Debian Debian Linux, Fedoraproject Fedora, Netapp Oncommand Insight, Oracle Banking Enterprise Default Management and 7 more.

How do I fix CVE-2021-21341?

Upgrade activemq to 5.15.14 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-21341 being exploited?

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

Public exploit code: 2 proofs of concept on GitHub.

All Apache Activemq vulnerabilities

Sources

Also known as BIT-activemq-2021-21341, DEBIAN-CVE-2021-21341, GHSA-2p3x-qw9c-25hh, UBUNTU-CVE-2021-21341.

Is CVE-2021-21341 in your software?

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

Check your SBOMs for free