CVE-2022-41966: XStream can cause Denial of Service via stack overflow
8.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.89094%
CWE
Published
12/29/2022
Updated
6/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.thoughtworks.xstream:xstream | maven | < 1.4.20 | 1.4.20 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from XStream's collection converters allowing unlimited recursion during deserialization of Java collection types. Specifically:
- MapConverter handles HashMap/LinkedHashMap/Hashtable deserialization
- SetConverter handles HashSet/LinkedHashSet deserialization These converters reconstruct collection objects from XML without proper depth validation, enabling attackers to craft nested structures that force recursive hashCode() calls. The hash code implementations of these collections recursively calculate member hashes, leading to stack overflow. The workarounds explicitly mention denying these collection types, confirming their converters' involvement. The patch in 1.4.20 likely adds recursion depth checks in these conversion paths.