CVE-2022-41966XStream Denial of Service via stack overflow
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libxstream-java | Fix pending | UBUNTU-CVE-2022-41966 | |
| Ubuntu 26.04 | libxstream-java | Under investigation | UBUNTU-CVE-2022-41966 | |
| Ubuntu 25.10 | libxstream-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-41966 | |
| Ubuntu 24.04 | libxstream-java | Under investigation | UBUNTU-CVE-2022-41966 | |
| Ubuntu 22.04 | libxstream-java | Fixed | 1.4.18-2ubuntu0.1 | UBUNTU-CVE-2022-41966 |
| Ubuntu 20.04 | libxstream-java | Fixed | 1.4.11.1-1ubuntu0.3 | UBUNTU-CVE-2022-41966 |
| Ubuntu 18.04 | libxstream-java | Fixed | 1.4.11.1-1+deb10u4build0.18.04.1 | UBUNTU-CVE-2022-41966 |
| Ubuntu 16.04 | libxstream-java | Will 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.04 | libxstream-java | Fix pending | 1.4.7-1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-41966 |
| Debian 14 | libxstream-java | Fixed | 1.4.20-1 | DEBIAN-CVE-2022-41966 |
| Debian 13 | libxstream-java | Fixed | 1.4.20-1 | DEBIAN-CVE-2022-41966 |
| Debian 12 | libxstream-java | Fixed | 1.4.20-1 | DEBIAN-CVE-2022-41966 |
| Red Hat Enterprise Linux 7 | xstream | Not affected | ||
| Red Hat Enterprise Linux 7 | xstream-javadoc | Not affected | ||
| Maven library | com.thoughtworks.xstream:xstream | Fixed | 1.4.20 | GHSA-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.
- x-stream xstream: affected: < 1.4.20
References
- https://github.com/x-stream/xstream/security/advisories/GHSA-j563-grx4-pjpv
- https://x-stream.github.io/CVE-2022-41966.html
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.