Skip to content
OpenAdvisories
High · 8.2 Public exploit CVE-2022-41966 EUVD-2022-7656GHSA-j563-grx4-pjpv

XStream Denial of Service via stack overflow

Published Dec 27, 2022 · Updated Apr 11, 2025 · Assigned by GitHub_M

Description

XStream serializes Java objects to XML and back again. Versions prior to 1.4.20 may allow a remote attacker to terminate the application with a stack overflow error, resulting in a denial of service only via manipulation the processed input stream. The attack uses the hash code implementation for collections and maps to force recursive hash calculation causing a stack overflow. This issue is patched in version 1.4.20 which handles the stack overflow and raises an InputManipulationException instead. A potential workaround for users who only use HashMap or HashSet and whose XML refers these only as default map or set, is to change the default implementation of java.util.Map and java.util per the code example in the referenced advisory. However, this implies that your application does not care about the implementation of the map and all elements are comparable.

Affected products

VendorProductAffectedFixed
x-stream xstream < 1.4.20 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libxstream-java 1.4.20-1 —
Debian 13 libxstream-java 1.4.20-1 —
Debian 12 libxstream-java 1.4.20-1 —
Debian 11 libxstream-java 1.4.15-3+deb11u2 DSA-5315-1
Debian 10 libxstream-java 1.4.11.1-1+deb10u4 DLA-3267-1
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libxstream-java No fix yet —
Ubuntu 26.04 LTS libxstream-java No fix yet —
Ubuntu 25.10 libxstream-java No fix yet —
Ubuntu 24.04 LTS libxstream-java No fix yet —
Ubuntu 22.04 LTS libxstream-java 1.4.18-2ubuntu0.1 USN-5946-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libxstream-java 1.4.11.1-1ubuntu0.3 USN-5946-1
Ubuntu 18.04 LTS libxstream-java 1.4.11.1-1+deb10u4build0.18.04.1 USN-5946-1
Ubuntu Pro 16.04 LTS libxstream-java 1.4.8-1ubuntu0.1+esm1 USN-5946-1
Ubuntu Pro 14.04 LTS libxstream-java 1.4.7-1ubuntu0.1+esm1 USN-5946-1
ReleasePackageFixed inAdvisory
Red Hat OpenShift 4 jenkins 2.401.1.1685677065-1.el8 RHSA-2023:3625
Red Hat OpenShift 4 jenkins-2-plugins 4.10.1685679861-1.el8 RHSA-2023:3625
Red Hat Ocp Tools 4 jenkins 2.401.1.1686831596-3.el8 RHSA-2023:3663
Red Hat Ocp Tools 4 jenkins-2-plugins 4.11.1686831822-1.el8 RHSA-2023:3663
ReleasePackageFixed inAdvisory
SLES 15 SP4 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLES 15 SP3 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLES 15 SP2 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
Show 9 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLES for SAP 15 SP2 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLE Real Time 15 SP3 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLE HPC 15 SP3 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SLE HPC 15 SP2 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SUSE Manager Server Module 4.3 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SUSE Manager Server Module 4.2 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SUSE Enterprise Storage 7.1 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
SUSE Enterprise Storage 7 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed xstream 1.4.20-1.1 openSUSE-SU-2024:12796-1
openSUSE Leap 15.4 xstream 1.4.20-150200.3.25.1 SUSE-SU-2023:1673-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 xstream +1 1.3.1-16.amzn2.0.1 ALAS2-2023-2007

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven com.thoughtworks.xstream:xstream < 1.4.20 1.4.20 GHSA-j563-grx4-pjpv

Advisories 29

References