Skip to content
Fencer Vulns
medium 5.8

CVE-2021-21345 json

XStream is vulnerable to a Remote Command Execution attack

published 2021-03-22 5 y ago modified 2026-10-07 32 d ago also BIT-activemq-2021-21345 , EUVD-2021-0674 , GHSA-hwpc-8xqv-jvj4

cvss
5.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
72.3%
EPSS 72.3% chance of exploitation in 30 days, percentile 99.4%
public exploits
0
none known, plus a Nuclei check

Summary

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability which may allow a remote attacker who has sufficient rights to execute commands of the host 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.

Patch / fix

  • maven com.thoughtworks.xstream:xstream 1.4.16
  • bitnami activemq 5.15.14
  • apache activemq 5.15.14
  • apache jmeter 5.5
  • xstream xstream 1.4.16
  • libxstream-java Debian 14, Debian 13, Debian 12 1.4.15-2

debian advisories DEBIAN-CVE-2021-21345

  • libxstream-java Ubuntu 18.04 LTS 1.4.11.1-1~18.04.2
  • libxstream-java Ubuntu 20.04 LTS 1.4.11.1-1ubuntu0.2
  • libxstream-java Ubuntu Pro 14.04 LTS 1.4.7-1ubuntu0.1+esm2
  • libxstream-java Ubuntu Pro 16.04 LTS 1.4.8-1ubuntu0.1+esm3

ubuntu advisories UBUNTU-CVE-2021-21345

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • xstream RHEL 7 1.3.1-13.el7_9
  • xstream-javadoc RHEL 7 1.3.1-13.el7_9

red hat advisories RHSA-2021:1354

  • xstream SLE Module for Development Tools 15 SP3, SLE Module for Development Tools 15 SP2, Manager Server Module 4.2 +1 more 1.4.16-3.8.1

suse advisories SUSE-SU-2021:1840-2SUSE-SU-2021:1840-1

  • xstream openSUSE Tumbleweed 1.4.18-1.1
  • xstream openSUSE Leap 15.3 1.4.16-3.8.1
  • xstream openSUSE Leap 15.2 1.4.16-lp152.2.6.1

opensuse advisories openSUSE-SU-2024:10592-1openSUSE-SU-2021:1840-1openSUSE-SU-2021:0832-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-21345 updated cvss 8.5

XStream: Unsafe deserizaliation of com.sun.corba.se.impl.activation.ServerTableEntry

  • Red Hat BPM Suite 6 xstream
    affected: no fix planned “Out of support scope”
  • Red Hat Integration Camel K 1 xstream
    affected: no fix available
  • Red Hat JBoss A-MQ 6 xstream Red Hat JBoss BRMS 5 xstream Red Hat JBoss BRMS 6 xstream Red Hat JBoss Data Grid 7 xstream Red Hat JBoss Data Virtualization 6 xstream Red Hat JBoss Fuse 6 xstream
    +2 more products
    Red Hat JBoss Fuse Service Works 6 xstream Red Hat JBoss SOA Platform 5 xstream
    affected: no fix planned “Out of support scope”
  • Red Hat Data Grid 8.2.0
    fixed: vendor fix RHSA-2021:2139
  • Red Hat Enterprise Linux Client Optional (v. 7) xstream 1.3.1-13.el7_9, xstream-javadoc 1.3.1-13.el7_9 Red Hat Enterprise Linux ComputeNode Optional (v. 7) xstream 1.3.1-13.el7_9, xstream-javadoc 1.3.1-13.el7_9 Red Hat Enterprise Linux Server Optional (v. 7) xstream 1.3.1-13.el7_9, xstream-javadoc 1.3.1-13.el7_9 Red Hat Enterprise Linux Workstation Optional (v. 7) xstream 1.3.1-13.el7_9, xstream-javadoc 1.3.1-13.el7_9
    fixed: vendor fix RHSA-2021:1354
  • Red Hat Fuse 7.10
    fixed: vendor fix RHSA-2021:5134
  • Red Hat Integration
    fixed: vendor fix RHSA-2021:4918
  • Red Hat Integration Camel Quarkus 2
    fixed: vendor fix RHSA-2021:4767
show 3 more
  • Red Hat RHDM 7.11.0
    fixed: vendor fix RHSA-2021:2476
  • Red Hat RHPAM 7.11.0
    fixed: vendor fix RHSA-2021:2475
  • Red Hat Integration Camel Quarkus 1 xstream Red Hat OpenShift Container Platform 3.11 jenkins Red Hat OpenShift Container Platform 4 jenkins
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
32 d ago

Exploit prediction

72.32% chance of exploitation in the next 30 days, higher than 99.4% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Nuclei template XStream < 1.4.16 - Remote Code Execution nuclei detection template
  • x-stream.github.io https://x-stream.github.io/CVE-2021-21345.html referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 5.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N
GitHub 3.1 5.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N
NVD 3.1 9.9 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD 2.0 6.5 AV:N/AC:L/Au:S/C:P/I:P/A:P
OSV 3.1 9.9 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven com.thoughtworks.xstream:xstream
<1.4.16
1.4.16
bitnami activemq
<5.15.14
>=5.16.0, <=5.16.0
>=5.16.1, <=5.16.1
5.15.14

Affected products

  • x-stream xstream

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code
  • CWE-502 Deserialization of Untrusted Data
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.