CVE Vulnerabilities

CVE-2022-41966

Uncontrolled Recursion

Published: Dec 28, 2022 | Modified: Jun 27, 2023
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

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.

Weakness

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Affected Software

Name Vendor Start Version End Version
Xstream Xstream_project * 1.4.20 (excluding)
Migration Toolkit for Runtimes 1 on RHEL 8 RedHat mtr/mtr-web-container-rhel8:1.0-22 *
MTA-6.1-RHEL-8 RedHat mta/mta-windup-addon-rhel8:6.1.0-11 *
OpenShift Developer Tools and Services for OCP 4.11 RedHat jenkins-0:2.401.1.1686831596-3.el8 *
Red Hat build of Quarkus 2.7.7 RedHat com.thoughtworks.xstream/xstream *
Red Hat Fuse 7.12 RedHat xstream *
Red Hat OpenShift Container Platform 4.10 RedHat jenkins-0:2.401.1.1685677065-1.el8 *
RHINT Camel-Q 2.7-1 RedHat *
RHINT Camel-Springboot 3.20.1 RedHat xstream *
RHPAM 7.13.5 async RedHat xstream *
Libxstream-java Ubuntu bionic *
Libxstream-java Ubuntu esm-apps/xenial *
Libxstream-java Ubuntu focal *
Libxstream-java Ubuntu jammy *
Libxstream-java Ubuntu kinetic *
Libxstream-java Ubuntu lunar *
Libxstream-java Ubuntu mantic *
Libxstream-java Ubuntu trusty *
Libxstream-java Ubuntu trusty/esm *
Libxstream-java Ubuntu xenial *

Potential Mitigations

References