CVE-2022-41966

CVE-2022-41966 is a high-severity vulnerability in Xstream with a CVSS 3.x base score of 8.2. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-674.

Key facts

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.

Frequently asked questions

What is CVE-2022-41966?
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.
How severe is CVE-2022-41966?
CVE-2022-41966 has a CVSS 3.x base score of 8.2, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity low, and availability high.
Is CVE-2022-41966 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 9% (94th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2022-41966?
CVE-2022-41966 affects Xstream. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2022-41966?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
When was CVE-2022-41966 published?
CVE-2022-41966 was published on 2022-12-28 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Xstream

All CVEs affecting Xstream →

Other CWE-674 (Uncontrolled Recursion) vulnerabilities

Browse all CWE-674 (Uncontrolled Recursion) vulnerabilities →