CVE-2021-39140: XStream can cause a Denial of Service
XStream is a simple library to serialize objects to XML and back again. In affected versions this vulnerability 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. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/xstreamto a version that resolves this vulnerability.Fixed in 0:1.3.1-16.el7_9 - Upgrade
Upgrade
debian/libxstream-javato a version that resolves this vulnerability.Fixed in 1.4.11.1-1+deb10u3Fixed in 1.4.11.1-1+deb10u4Fixed in 1.4.15-3+deb11u2Fixed in 1.4.20-1 - Upgrade
Upgrade
redhat/xstreamto a version that resolves this vulnerability.Fixed in 1.4.18 - Upgrade
Upgrade
x-stream/xstreamto a version that resolves this vulnerability.Fixed in 1.4.18 - Configuration
Set up XStream's security framework with a whitelist limited to the minimal required types (this prevents the described DoS by ensuring only the necessary types can be processed).
XStream security framework whitelist (types) limited to minimal required types = enabled
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-39140?
CVE-2021-39140 is a vulnerability in XStream that allows a remote attacker to allocate 100% CPU time on the target system, leading to a denial of service.
How severe is CVE-2021-39140?
CVE-2021-39140 has a severity score of 6.5, indicating a medium-level vulnerability.
Which software versions are affected by CVE-2021-39140?
CVE-2021-39140 affects XStream versions up to and exclusive of 1.4.18, as well as specific versions of libxstream-java and certain packages in Debian, Red Hat, Fedora, Netapp, Oracle, and other software.
How can a remote attacker exploit CVE-2021-39140?
A remote attacker can exploit CVE-2021-39140 by manipulating XML serialized objects, causing the target system to allocate 100% CPU time and resulting in a denial of service.
Are there any fixes or remedies available for CVE-2021-39140?
Yes, upgrading to XStream version 1.4.18 or applying the specific remedies provided for the affected software can mitigate the vulnerability.