CVEfocus › CVE database › CVE-2022-41966

CVE-2022-41966XStream Denial of Service via stack overflow

CVSS 8.2 HighEPSS 4.0% (higher than 91% of CVEs)Published 2022-12-27Updated 2025-04-11Assigner: GitHub_M

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.

CWE-120CWE-121CWE-502

What to do

Fixed builds are available from Debian, Maven, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
2Fix pending
2Under investigation
2Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libxstream-javaFix pendingUBUNTU-CVE-2022-41966
Ubuntu 26.04libxstream-javaUnder investigationUBUNTU-CVE-2022-41966
Ubuntu 25.10libxstream-javaWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-41966
Ubuntu 24.04libxstream-javaUnder investigationUBUNTU-CVE-2022-41966
Ubuntu 22.04libxstream-javaFixed1.4.18-2ubuntu0.1UBUNTU-CVE-2022-41966
Ubuntu 20.04libxstream-javaFixed1.4.11.1-1ubuntu0.3UBUNTU-CVE-2022-41966
Ubuntu 18.04libxstream-javaFixed1.4.11.1-1+deb10u4build0.18.04.1UBUNTU-CVE-2022-41966
Ubuntu 16.04libxstream-javaWill not fix
Ubuntu decided not to fix this in this release
1.4.8-1ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-41966
Ubuntu 14.04libxstream-javaFix pending1.4.7-1ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-41966
Debian 14libxstream-javaFixed1.4.20-1DEBIAN-CVE-2022-41966
Debian 13libxstream-javaFixed1.4.20-1DEBIAN-CVE-2022-41966
Debian 12libxstream-javaFixed1.4.20-1DEBIAN-CVE-2022-41966
Red Hat Enterprise Linux 7xstreamNot affected
Red Hat Enterprise Linux 7xstream-javadocNot affected
Maven librarycom.thoughtworks.xstream:xstreamFixed1.4.20GHSA-j563-grx4-pjpv

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.