CVE-2021-39151
Remote Code Execution vulnerability in com.thoughtworks.xstream:xstream

Remote Code Execution No known exploit

What is CVE-2021-39151 About?

This vulnerability enables a remote attacker to execute arbitrary code by manipulating the processed input stream. The impact is severe, potentially leading to full system compromise. Exploitation is relatively straightforward if the application processes untrusted input via XStream without proper security measures.

Affected Software

com.thoughtworks.xstream:xstream <1.4.18

Technical Details

The vulnerability stems from XStream's deserialization process, where a crafted input stream can lead to the loading and execution of arbitrary code from a remote host. This scenario occurs when XStream is configured to process untrusted XML or JSON input without a strict whitelist for allowed types. An attacker can inject specific gadget chains into the input stream that, upon deserialization, trigger the instantiation of arbitrary classes and method calls, bypassing XStream's default blacklist. This allows for remote compromise of the system running the vulnerable XStream application.

What is the Impact of CVE-2021-39151?

Successful exploitation may allow attackers to execute arbitrary code, leading to complete system control, data theft, or denial of service.

What is the Exploitability of CVE-2021-39151?

Exploitation is of moderate complexity, necessitating understanding of XStream's internal workings and Java deserialization. No authentication is required, as the attack vectors involve manipulating data streams directly. There are no specific privilege requirements on the target system to initiate the attack. This is a remote vulnerability, allowing an attacker to exploit it across a network. A key prerequisite is the processing of untrusted input through XStream without a security framework configured with a whitelist of permissible types. The default blacklist is often insufficient, increasing the likelihood of successful exploitation.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2021-39151?

Available Upgrade Options

  • com.thoughtworks.xstream:xstream
    • <1.4.18 → Upgrade to 1.4.18

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2021-39151?

Similar Vulnerabilities: CVE-2021-39153 , CVE-2021-21350 , CVE-2020-26217 , CVE-2020-26258 , CVE-2017-7957