CVE-2022-41966: XStream Denial of Service via stack overflow
Vulnerability summary
CVE-2022-41966 is a high (CVSS 8.2) vulnerability in x-stream xstream. EPSS estimates a 9.35% chance of exploitation in the next 30 days, higher than 95.3% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 5 · Related 3Timeline
- 27-12-2022PublishedVulnerability first disclosed.
- 11-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 6 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · ChainguardEcosystem advisory · calculated8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
- OSV · MavenEcosystem advisory · calculated8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
EPSS trend
Probability
9.35%
Chance of exploitation in the next 30 days
Percentile
95%
Versus all other CVEs
30-day change
Increase +0.59 pp
From 8.76% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (x-stream.github.io)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-120Buffer Copy without Checking Size of InputThe product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.
- CWE-121Stack-based Buffer OverflowThe product writes past the end of a buffer that was allocated on the stack.
- CWE-502Deserialization of Untrusted DataThe product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- CWE-674Uncontrolled RecursionThe product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard2 products
- hadoop-fips-3.3.6All versions (No fix recorded)
- hadoop-fips-3.4.2All versions (No fix recorded)
Com.thoughtworks.xstream1 product
- xstream< 1.4.20
Debian1 product
- libxstream-java< 1.4.15-3+deb11u2 | < 1.4.11.1-1+deb10u4 | < 1.4.20-1
Ubuntu1 product
- libxstream-java< 1.4.7-1ubuntu0.1+esm1 | < 1.4.8-1ubuntu0.1+esm1 | < 1.4.11.1-1+deb10u4build0.18.04.1 | < 1.4.11.1-1ubuntu0.3 | < 1.4.18-2ubuntu0.1 | All versions (No fix recorded)
X-stream1 product
- xstream< 1.4.20
Xstream1 product
- xstream< 1.4.20
6 vendors · 7 products
References
10 links- github.com/x-stream/xstream/security/advisories/GHSA-j563-grx4-pjpvX Refsource CONFIRMREPORTAdvisoryWEBMitigationThird Party Advisory
- github.com/x-stream/xstreamPACKAGE