Every CVE Search/ Get API key

CVE-2022-40151

Stack Buffer Overflow in xstream

6.5 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.22%Up 1.3 points since Sep 17, 2022
90%50%10%1%

What each source reports

CVE List Score used 6.5

Stack Buffer Overflow in xstream

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.

Record
CVE-2022-40151
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-121
Updated
2026-11-02
EUVDEUVD-2022-7616 6.5

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.

Record
EUVD-2022-7616
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-f8cc-g7j8-xxpm 7.5

XStream can cause a Denial of Service by injecting deeply nested objects raising a stack overflow

Impact

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.

Patches

XStream 1.4.20 handles the stack overflow and raises an InputManipulationException instead.

Workarounds

The only solution is to catch the StackOverflowError in the client code calling XStream.

References

See full information about the nature of the vulnerability and the steps to reproduce it in XStream's documentation for CVE-2022-40151.

Credits

The vulnerability was discovered and reported by Henry Lin of the Google OSS-Fuzz team.

For more information

If you have any questions or comments about this advisory:

Record
GHSA-f8cc-g7j8-xxpm
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-121, CWE-502, CWE-787
Updated
2026-11-02
NVD 6.5

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.

Record
CVE-2022-40151
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-121, CWE-787
Updated
2026-11-02
OSV 6.5

Stack Buffer Overflow in xstream

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.

Record
CVE-2022-40151
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-121
Updated
2026-11-02
OSVDEBIAN-CVE-2022-40151 7.5

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.

Record
DEBIAN-CVE-2022-40151
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
Show 8 moreShow less
OSVGHSA-f8cc-g7j8-xxpm 7.5

XStream can cause a Denial of Service by injecting deeply nested objects raising a stack overflow

Impact

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.

Patches

XStream 1.4.20 handles the stack overflow and raises an InputManipulationException instead.

Workarounds

The only solution is to catch the StackOverflowError in the client code calling XStream.

References

See full information about the nature of the vulnerability and the steps to reproduce it in XStream's documentation for CVE-2022-40151.

Credits

The vulnerability was discovered and reported by Henry Lin of the Google OSS-Fuzz team.

For more information

If you have any questions or comments about this advisory:

Record
GHSA-f8cc-g7j8-xxpm
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-121, CWE-502, CWE-787
Updated
2026-11-02
OSVOESA-2023-1929 7.5

xstream security update

XStream is a simple library to serialize objects to XML and back again. A high level facade is supplied that simplifies common use cases. Custom objects can be serialized without need for specifying mappings. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. XStream serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor. Duplicate references encountered in the object-model will be maintained. Supports circular references. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). Strategies can be registered allowing customization of how particular types are represented as XML. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.

Security Fix(es):

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.(CVE-2022-40151)

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.(CVE-2022-41966)

Record
OESA-2023-1929
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2023-1937 7.5

xstream security update

XStream is a simple library to serialize objects to XML and back again. A high level facade is supplied that simplifies common use cases. Custom objects can be serialized without need for specifying mappings. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. XStream serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor. Duplicate references encountered in the object-model will be maintained. Supports circular references. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). Strategies can be registered allowing customization of how particular types are represented as XML. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.

Security Fix(es):

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.(CVE-2022-40151)

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.(CVE-2022-41966)

Record
OESA-2023-1937
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVRHSA-2023:3299 9.8

Red Hat Security Advisory: jenkins and jenkins-2-plugins security update

Record
RHSA-2023:3299
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2022-40151 6.5

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.

Record
UBUNTU-CVE-2022-40151
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVopenSUSE-SU-2024:12796-1 No score

xstream-1.4.20-1.1 on GA media

These are all security issues fixed in the xstream-1.4.20-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12796-1
Updated
2026-11-02
OSVROOT-APP-MAVEN-CVE-2022-40151 No score

CVE-2022-40151 in io.root.com.thoughtworks.xstream:xstream - Patched by Root

Root has patched CVE-2022-40151 in the io.root.com.thoughtworks.xstream:xstream package for Root:Maven. Multiple fixed versions available.

Record
ROOT-APP-MAVEN-CVE-2022-40151
Updated
2026-11-02
OSVSUSE-SU-2023:1673-1 No score

Security update for xstream

This update for xstream fixes the following issues:

  • CVE-2022-40151: Fixed stackoverflow in XML serialization (bsc#1203520).

  • CVE-2022-41966: Fixed denial of service via uncontrolled recursion during deserialization (bsc#1206729).

  • Upgrade to 1.4.20.

Record
SUSE-SU-2023:1673-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
com.thoughtworks.xstream:xstream
Maven
before 1.4.20
1.4.20
libxstream-java
Debian:12
All versions, plus listed versions
1.4.20-11.4.20-1+deb12u11.4.20-21.4.21-11.4.21-2
None known
libxstream-java
Debian:13
All versions, plus listed versions
1.4.21-11.4.21-2
None known
libxstream-java
Debian:14
All versions, plus listed versions
1.4.21-11.4.21-2
None known
com.thoughtworks.xstream:xstream
Maven
before 1.4.20, plus listed versions
0.10.20.30.50.6
Show 39 moreShow less
1.01.0.11.0.21.11.1.11.1.21.1.31.21.2.11.2.21.31.3.11.41.4.11.4.101.4.10-java71.4.111.4.11-java71.4.11.11.4.121.4.12-java71.4.131.4.13-java71.4.141.4.14-java71.4.14-jdk71.4.151.4.161.4.171.4.181.4.191.4.21.4.31.4.41.4.51.4.61.4.71.4.81.4.9
1.4.20
xstream
openEuler:20.03-LTS-SP1
From an advisory covering 2 CVEs
before 1.4.20-1.oe1
1.4.20-1.oe1
xstream
openEuler:20.03-LTS-SP3
From an advisory covering 2 CVEs
before 1.4.20-1.oe1
1.4.20-1.oe1
xstream
openEuler:22.03-LTS
From an advisory covering 2 CVEs
before 1.4.20-1.oe2203sp2
1.4.20-1.oe2203sp2
xstream
openEuler:22.03-LTS-SP1
From an advisory covering 2 CVEs
before 1.4.20-1.oe2203sp1
1.4.20-1.oe2203sp1
xstream
openEuler:22.03-LTS-SP2
From an advisory covering 2 CVEs
before 1.4.20-1.oe2203sp2
1.4.20-1.oe2203sp2
Show 29 moreShow less
Affected packages
PackageAffectedFixed
xstream
openEuler:20.03-LTS-SP4
From an advisory covering 2 CVEs
before 1.4.20-1.oe2003sp4
1.4.20-1.oe2003sp4
jenkins-2-plugins
Red Hat:ocp_tools:4.13::el8
From an advisory covering 16 CVEs
before 0:4.13.1684911916-1.el8
0:4.13.1684911916-1.el8
jenkins
Red Hat:ocp_tools:4.13::el8
From an advisory covering 16 CVEs
before 0:2.387.3.1684911776-3.el8
0:2.387.3.1684911776-3.el8
io.root.com.thoughtworks.xstream:xstream
Root:Maven
before 1.4.20-root.io.1
1.4.20-root.io.11.4.20-root.io.2
com.thoughtworks.xstream:xstream
Root:Maven
before 1.4.20-aikido.2
1.4.20-aikido.2
xstream
SUSE:Linux Enterprise Module for Development Tools 15 SP4
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Manager Server Module 4.2
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Manager Server Module 4.3
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise Real Time 15 SP3
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise Server 15 SP2-LTSS
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise Server 15 SP3-LTSS
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise Server for SAP Applications 15 SP2
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Linux Enterprise Server for SAP Applications 15 SP3
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Enterprise Storage 7
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
SUSE:Enterprise Storage 7.1
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
xstream
openSUSE:Leap 15.4
From an advisory covering 2 CVEs
before 1.4.20-150200.3.25.1
1.4.20-150200.3.25.1
libxstream-java
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
1.4.4-11.4.7-11.4.7-1ubuntu0.11.4.7-1ubuntu0.1+esm11.4.7-1ubuntu0.1+esm2
None known
libxstream-java
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.4.8-11.4.8-1ubuntu0.11.4.8-1ubuntu0.1+esm11.4.8-1ubuntu0.1+esm21.4.8-1ubuntu0.1+esm3
None known
libxstream-java
Ubuntu:18.04:LTS
All versions, plus listed versions
1.4.10-11.4.11.1-1~18.041.4.11.1-1~18.04.11.4.11.1-1~18.04.21.4.11.1-1+deb10u4build0.18.04.1
None known
libxstream-java
Ubuntu:20.04:LTS
All versions, plus listed versions
1.4.11.1-11.4.11.1-1ubuntu0.11.4.11.1-1ubuntu0.21.4.11.1-1ubuntu0.3
None known
libxstream-java
Ubuntu:22.04:LTS
All versions, plus listed versions
1.4.15-41.4.18-21.4.18-2ubuntu0.1
None known
libxstream-java
Ubuntu:24.04:LTS
All versions, plus listed versions
1.4.20-1
None known
libxstream-java
Ubuntu:25.10
All versions, plus listed versions
1.4.21-1
None known
libxstream-java
Ubuntu:26.10
All versions, plus listed versions
1.4.21-1
None known
libxstream-java
Ubuntu:26.04:LTS
All versions, plus listed versions
1.4.21-1
None known
xstream
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 1.4.20-1.1
1.4.20-1.1

History

History
RecordedChangedSources
affected, factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-40151 is a medium vulnerability (CVSS 6.5) in X-stream Xstream, published September 16, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.22%, the 82nd percentile. Fixed in com.thoughtworks.xstream:xstream 1.4.20.

References

Show 90 moreShow less
MoveEnter Open