CVE-2022-40151: XStream can cause a Denial of Service by injecting deeply nested objects raising a stack overflow
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.42223%
CWE
Published
12/30/2022
Updated
1/7/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:N/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 uncontrolled recursion during XML unmarshalling of deeply nested structures. The TreeUnmarshaller.startElement
method is responsible for processing nested elements recursively. Pre-1.4.20 versions lacked depth tracking in this critical path, allowing attackers to craft malicious payloads that exhaust the call stack. The patch in 1.4.20 introduced depth validation
in this unmarshalling process
, confirming this as the vulnerable code path.