cve.bz

CVE-2021-29505 Deserialization of Untrusted Data

8.8 highEPSS 77%Fix available

High (8.8). EPSS 77% estimated probability of exploitation activity in the next 30 days. Fixed in com.thoughtworks.xstream:xstream 1.4.17.

On this page
XStream is software for serializing Java objects to XML and back again. A vulnerability in XStream versions prior to 1.4.17 may allow a remote attacker has sufficient rights to execute commands of the host only by manipulating the processed input stream. No user who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types is affected. The vulnerability is patched in version 1.4.17.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
77% (unchanged from 77% a week ago; 77% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-07. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-502 Deserialization of Untrusted Data
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-29505 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-29505?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-29505?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-29505 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2021-29505

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2021-29505](https://cve.bz/cve/badge/CVE-2021-29505.svg)](https://cve.bz/cve/CVE-2021-29505)

HTML:

<a href="https://cve.bz/cve/CVE-2021-29505"><img src="https://cve.bz/cve/badge/CVE-2021-29505.svg" alt="CVE-2021-29505"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
xstream:xstreambefore 1.4.17
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora33
fedoraproject:fedora34
fedoraproject:fedora35
oracle:banking_cash_management14.2
oracle:banking_cash_management14.3
oracle:banking_cash_management14.5
oracle:banking_corporate_lending_process_management14.2.0
oracle:banking_corporate_lending_process_management14.3.0
oracle:banking_corporate_lending_process_management14.5.0
oracle:banking_credit_facilities_process_management14.2.0
oracle:banking_credit_facilities_process_management14.3.0
oracle:banking_credit_facilities_process_management14.5.0
oracle:banking_supply_chain_finance14.2.0
oracle:banking_trade_finance_process_management14.5.0
oracle:business_activity_monitoring11.1.1.9.0
oracle:business_activity_monitoring12.2.1.3.0
oracle:business_activity_monitoring12.2.1.4.0
oracle:communications_brm_-_elastic_charging_engine11.3
oracle:communications_brm_-_elastic_charging_engine12.0
oracle:communications_unified_inventory_management7.3.4
oracle:communications_unified_inventory_management7.3.5
oracle:communications_unified_inventory_management7.4.0
oracle:communications_unified_inventory_management7.4.1
oracle:communications_unified_inventory_management7.4.2
oracle:enterprise_manager_ops_center12.4.0.0
oracle:retail_customer_insights15.0.2
oracle:retail_customer_insights16.0.2
oracle:retail_xstore_point_of_service16.0.6
oracle:retail_xstore_point_of_service17.0.4
oracle:retail_xstore_point_of_service18.0.3
oracle:retail_xstore_point_of_service19.0.2
oracle:retail_xstore_point_of_service20.0.1
oracle:webcenter_portal12.2.1.3.0
oracle:webcenter_portal12.2.1.4.0
oracle:webcenter_sites12.2.1.3.0
oracle:webcenter_sites12.2.1.4.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7chv-rrw6-w6fcMavencom.thoughtworks.xstream:xstream<1.4.171.4.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9libxstream-java1.4.11.1-1+deb9u3DLA-2704-1
Debian12, 13, 14libxstream-java1.4.15-3DEBIAN-CVE-2021-29505
Ubuntu18.04:LTS, 20.04:LTS, Pro:14.04:LTS and 1 morelibxstream-javano fix listedUBUNTU-CVE-2021-29505
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morexstream, xstream-javadoc0:1.3.1-14.el7_9RHSA-2021:2683
SUSELinux Enterprise Module for Development Tools 15 SP2, Linux Enterprise Module for Development Tools 15 SP3, Manager Server Module 4.1 and 1 morexstream1.4.17-3.11.2SUSE-SU-2021:1995-1
openSUSELeap 15.2xstream1.4.17-lp152.2.9.1openSUSE-SU-2021:0911-1
openSUSELeap 15.3xstream1.4.17-3.11.2openSUSE-SU-2021:1995-1
openSUSETumbleweedxstream1.4.18-1.1openSUSE-SU-2024:10592-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

OpenShift Container Platform (OCP) delivers Jenkins LTS package with bundled XStream library. Due to JEP-200 [1] and JEP-228 [2] Jenkins projects, OCP Jenkins package is not affected by this flaw.

CodeReady Studio 12 ships a version of xstream that is affected by this flaw as a transitive dependency for the Wise framework plugin. However, the vulnerable code is not called, so this flaw has been marked as Low severity for CodeReady Studio 12.

[1] https://github.com/jenkinsci/jep/blob/master/jep/200/README.adoc

[2] https://github.com/jenkinsci/jep/blob/master/jep/228/README.adoc#security

Red Hat's mitigation

Depending on the version of XStream used there are various usage patterns that mitigate this flaw, though we would strongly recommend using the allow list approach if at all possible as there are likely more class combinations the deny list approach may not address.

Allow list approach

```java

XStream xstream = new XStream();

XStream.setupDefaultSecurity(xstream);

xstream.allowTypesByWildcard(new String[] {"com.misc.classname"})

```

Deny list for XStream 1.4.16 (this should also address some previous flaws found in 1.4.7 - > 1.4.15)

```java

xstream.denyTypesByRegExp(new String[]{ ".*\\.Lazy(?:Search)?Enumeration.*", "(?:java|sun)\\.rmi\\..*" });

```

Deny list for XStream 1.4.15

```java

xstream.denyTypes(new String[]{ "sun.awt.datatransfer.DataTransferer$IndexOrderComparator", "sun.swing.SwingLazyValue", "com.sun.corba.se.impl.activation.ServerTableEntry", "com.sun.tools.javac.processing.JavacProcessingEnvironment$NameProcessIterator" });

xstream.denyTypesByRegExp(new String[]{ ".*\\$ServiceNameIterator", "javafx\\.collections\\.ObservableList\\$.*", ".*\\.bcel\\..*\\.util\\.ClassLoader" });

xstream.denyTypeHierarchy(java.io.InputStream.class );

xstream.denyTypeHierarchy(java.nio.channels.Channel.class );

xstream.denyTypeHierarchy(javax.activation.DataSource.class );

xstream.denyTypeHierarchy(javax.sql.rowset.BaseRowSet.class );

```

Deny list for XStream 1.4.13

```java

xstream.denyTypes(new String[]{ "javax.imageio.ImageIO$ContainsFilter" });

xstream.denyTypes(new Class[]{ java.lang.ProcessBuilder.class });

```

Deny list for XStream 1.4.7 -> 1.4.12

```java

xstream.denyTypes(new String[]{ "javax.imageio.ImageIO$ContainsFilter" });

xstream.denyTypes(new Class[]{ java.lang.ProcessBuilder.class, java.beans.EventHandler.class, java.lang.ProcessBuilder.class, java.lang.Void.class, void.class });

```

Deny list for versions prior to XStream 1.4.7

```java

xstream.registerConverter(new Converter() {

public boolean canConvert(Class type) {

return type != null && (type == java.beans.EventHandler.class || type == java.lang.ProcessBuilder.class || type == java.lang.Void.class || void.class || type.getName().equals("javax.imageio.ImageIO$ContainsFilter") || Proxy.isProxy(type));

}

public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {

throw new ConversionException("Unsupported type due to security reasons.");

}

public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {

throw new ConversionException("Unsupported type due to security reasons.");

}

}, XStream.PRIORITY_LOW);

```

ProductPackageStateAdvisory
Red Hat Data Grid 8.3.0xstreamFixed 2022-02-14RHSA-2022:0520
Red Hat Enterprise Linux 7xstream-0:1.3.1-14.el7_9Fixed 2021-07-12RHSA-2021:2683
Red Hat Fuse 7.11xstreamFixed 2022-07-07RHSA-2022:5532
Red Hat IntegrationxstreamFixed 2021-12-02RHSA-2021:4918
Red Hat Integration Camel Quarkus 2Fixed 2021-11-23RHSA-2021:4767
RHDM 7.12.0xstreamFixed 2022-01-26RHSA-2022:0297
RHPAM 7.12.0xstreamFixed 2022-01-26RHSA-2022:0296
Red Hat BPM Suite 6xstreamWill not fix
Red Hat Integration Camel Quarkus 1xstreamAffected
Red Hat JBoss A-MQ 6xstreamOut of support scope
Red Hat JBoss BRMS 5xstreamWill not fix
Red Hat JBoss BRMS 6xstreamWill not fix
Red Hat JBoss Data Grid 7xstreamOut of support scope
Red Hat JBoss Data Virtualization 6xstreamWill not fix
Red Hat JBoss Fuse 6xstreamOut of support scope
Red Hat JBoss Fuse Service Works 6xstreamOut of support scope
Red Hat JBoss SOA Platform 5xstreamWill not fix
Red Hat OpenShift Container Platform 3.11jenkinsNot affected
Red Hat OpenShift Container Platform 4jenkinsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-29505.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON