CVE-2022-41966: XStream Denial of Service Vulnerability
The maintainers of XStream have shipped patches to resolve a high-severity security flaw in its software library that could lead to a denial-of-service (DoS) condition.
XStream is a simple library to serialize objects to XML and back again. XStream uses reflection to discover the structure of the object graph to serialize at run time and doesn’t require modifications to objects. It can serialize internal fields, including private and final, and supports non-public and inner classes.
The denial of service vulnerability, assigned CVE-2022-41966, affects all versions of the XStream version prior to 1.4.20 and could be exploited “only via manipulation the processed input stream.”
“The processed stream at unmarshalling time contains type information to recreate the formerly written objects. XStream creates therefore new instances based on these type information. An attacker can manipulate the processed input stream and replace or inject objects, that result in a stack overflow calculating a recursive hash set causing a denial of service,” XStream advisory says.
The vulnerability may allow a remote attacker to terminate the application with a stack overflow error resulting in a denial of service only by manipulating the processed input stream.
The maintainers of XStream have addressed CVE-2022-41966 with the release of the new XStream version 1.4.20 and have advised users to update the vulnerable library immediately.