External risk intelligence

XStream Remote Code Execution Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2021-21347

XStream is a widely used serialization library embedded in numerous internet-facing enterprise products and middleware, such as Apache ActiveMQ and Oracle WebLogic. Because it is frequently utilized by web-exposed services and APIs to process input, the library is commonly reachable in environments that face the public internet, despite its role as an underlying component.

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability in the XStream Java library could allow an unauthorized remote attacker to execute arbitrary code. This issue arises when processing specially crafted input streams, potentially impacting systems that rely on XStream's default security settings rather than a strictly defined whitelist.

  • A code execution flaw exists in XStream processing.
  • It impacts systems using default security configurations.
  • Confirm relevance and assess exposure to XStream usage.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by sending a specially crafted input stream to an application that uses a vulnerable version of XStream. This manipulated input could trick XStream into loading and executing arbitrary code from a remote host. This is possible because XStream, by default, does not adequately protect against malicious input during the deserialization process.

  • No authentication or privileges required.
  • Malicious input processed by XStream.
  • Remote code execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, this vulnerability could allow a remote attacker to execute arbitrary code by manipulating processed input streams. This could affect system data, service behavior, or sensitive information when XStream is configured with its default blacklist security framework.

  • System data and services.
  • Malicious input stream manipulation.
  • Remote code execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

Teams responsible for managing applications that use XStream, such as platform, development, or infrastructure teams, should lead the response. The initial critical step is to identify all instances of XStream within the environment, assess their exposure and criticality, and confirm the accountable owner for each. This will inform a prioritized remediation plan.

  • Application owners should manage this issue.
  • Verify XStream usage and reachability.
  • Plan remediation based on risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is XStream?

XStream is a Java library designed to convert (serialize) objects into XML format and back again. Because it is highly efficient at processing data, it is commonly embedded within various enterprise middleware and software applications, such as Apache ActiveMQ and Oracle WebLogic, to handle data communication and storage tasks.

What does CVE-2021-21347 mean?

This is an arbitrary code execution vulnerability, categorized under weaknesses like improper input validation and deserialization (CWE-502). In simple terms, the library can be tricked into running unauthorized commands or programs if it processes a maliciously crafted input stream, potentially giving an attacker control over the application.

How does an attacker trigger this vulnerability?

An attacker triggers this by sending a specially prepared input stream to an application using a vulnerable version of XStream. It does not occur if the application uses a strict, minimal whitelist to authorize only specific data types. The flaw specifically impacts systems relying on the less secure default blacklist-based security framework.

Is my system at risk?

Halo Surface Signal indicates that because XStream is frequently embedded in internet-facing middleware and APIs, it is often reachable by public-facing services. You should assess if your environment uses affected software versions and if those services accept external, unauthenticated input, which increases the likelihood of exposure.

What are the first steps to take?

Your priority is to identify every application in your environment that includes the XStream library. Once located, confirm which versions are in use and determine if they are configured with a strict whitelist. If you cannot ensure a secure configuration, upgrading to version 1.4.16 or later is the necessary step to resolve the underlying weakness.

References