Stack Buffer Overflow in xstream
Description
Those using Xstream to seralize XML data may be vulnerable to Denial of Service attacks (DOS). If the parser is running on user supplied input, an attacker may supply content that causes the parser to crash by stackoverflow. This effect may support a denial of service attack.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
XStream versions up to 1.4.19 are vulnerable to denial of service via stack overflow when unmarshalling deeply nested XML objects.
Description
XStream, a Java library for serializing objects to XML and back, is vulnerable to a denial of service (DoS) attack due to a stack overflow. The vulnerability arises because XStream processes type information from the input stream during unmarshalling to recreate objects. An attacker can craft XML input containing deeply nested elements, causing the recursion depth to exceed the stack limit and resulting in a stack overflow error [2].
Exploitation
An attacker can exploit this vulnerability by supplying a malicious XML payload to an application that uses XStream to unmarshal user-supplied data. No authentication is required; the attacker only needs to be able to send the crafted input to the parser. The provided proof-of-concept demonstrates that nesting 10,000 `` elements is sufficient to trigger the overflow [2].
Impact
Successful exploitation causes the executing thread to abort with a StackOverflowError, leading to a denial of service. The application may become unresponsive or crash, depending on how the error is handled [4].
Mitigation
XStream version 1.4.20 addresses the issue by catching the StackOverflowError and throwing an InputManipulationException instead, preventing the crash. Users should upgrade to this version or later. As a workaround, client code can catch StackOverflowError when calling XStream [2][4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
com.thoughtworks.xstream:xstreamMaven | < 1.4.20 | 1.4.20 |
Affected products
16- ghsa-coords15 versionspkg:maven/com.thoughtworks.xstream/xstreampkg:rpm/opensuse/xstream&distro=openSUSE%20Leap%2015.4pkg:rpm/suse/xstream&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/xstream&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP4pkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3pkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/xstream&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/xstream&distro=SUSE%20Manager%20Server%20Module%204.2pkg:rpm/suse/xstream&distro=SUSE%20Manager%20Server%20Module%204.3
< 1.4.20+ 14 more
- (no CPE)range: < 1.4.20
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- (no CPE)range: < 1.4.20-150200.3.25.1
- xstream/xstreamv5Range: unspecified
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-f8cc-g7j8-xxpmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-40151ghsaADVISORY
- bugs.chromium.org/p/oss-fuzz/issues/detailghsax_refsource_MISCWEB
- github.com/x-stream/xstream/issues/304ghsax_refsource_MISCWEB
- github.com/x-stream/xstream/issues/314ghsaWEB
- github.com/x-stream/xstream/security/advisories/GHSA-f8cc-g7j8-xxpmghsaWEB
- x-stream.github.io/CVE-2022-40151.htmlghsaWEB
News mentions
0No linked articles in our index yet.