CVE-2021-21342 A Server-Side Forgery Request can be activated unmarshalling with XStream to access data streams from an arbitrary URL referencing a resource in an intranet or the local host

Medium 5.3 Published Updated

Attackers can trigger server-side request forgery via manipulated XML streams in XStream, allowing access to internal resources unless strict whitelisting is configured.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-21342?

CVE-2021-21342 is a medium-severity server-side request forgery vulnerability in Apache Activemq, published on 22 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability where the processed stream at unmarshalling time contains type information to recreate the formerly written objects. XStream creates therefore new instances based on these type information. An attacker can manipulate the processed input stream and replace or inject objects, that result in a server-side forgery request. 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-918, CWE-502

Which versions are affected by CVE-2021-21342?

3 open source packages ship an affected version, including activemq and com.thoughtworks.xstream:xstream. It affects 15 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 9 more.

How do I fix CVE-2021-21342?

Upgrade activemq to 5.15.14 or later.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2021-21342 being exploited?

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

All Apache Activemq vulnerabilities

Sources

Also known as BIT-activemq-2021-21342, DEBIAN-CVE-2021-21342, GHSA-hvv8-336g-rx3m, UBUNTU-CVE-2021-21342.

Is CVE-2021-21342 in your software?

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

Check your SBOMs for free