CVE-2022-41966
Java vulnerability analysis and mitigation

Overview

XStream, a Java library that serializes objects to XML and back, was found to contain a vulnerability (CVE-2022-41966) in versions prior to 1.4.20. The vulnerability was discovered by Lai Han of nsfocus security team and was disclosed in December 2022. The affected software allows remote attackers to cause a Denial of Service (DoS) condition through manipulation of the processed input stream (XStream CVE, NVD).

Technical details

The vulnerability exploits the hash code implementation for collections and maps to force recursive hash calculation, causing a stack overflow. The affected Java runtime types include java.util.HashMap, java.util.HashSet, java.util.Hashtable, java.util.LinkedHashMap, and java.util.LinkedHashSet. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (HIGH) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD, NetApp Advisory).

Impact

When successfully exploited, this vulnerability allows remote attackers to terminate the application with a stack overflow error, resulting in a denial of service condition. The attack specifically targets the application's ability to process XML data, affecting the availability of the service (XStream CVE, GitHub Advisory).

Mitigation and workarounds

The vulnerability is patched in XStream version 1.4.20, which handles the stack overflow and raises an InputManipulationException instead. For users unable to upgrade, several workarounds are available: catching the StackOverflowError in client code, using NO_REFERENCE mode for applications without referenced elements, denying specific Java collection types using the security framework, or changing the default implementation of java.util.Map and java.util.Set to their Tree variants (GitHub Advisory, XStream CVE).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66516CRITICAL10
  • JavaJava
  • opensearch-2
NoYesDec 04, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • org.lz4:lz4-pure-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
CVE-2025-11222MEDIUM6.1
  • JavaJava
  • com.linecorp.centraldogma:centraldogma-server-auth-shiro
NoYesDec 04, 2025
CVE-2025-66453MEDIUM5.5
  • JavaJava
  • org.mozilla:rhino
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management