CVE-2022-40151: Stack Buffer Overflow in xstream

Published Aug 7, 2022
·
Updated

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: Open an issue in XStream Contact us at XStream Google Group

Other sources

A flaw was found in the XStream package. This flaw allows an attacker to cause a denial of service (DoS) in its target via XML serialization.

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.

Affected Software

10 affected componentsFixes available
redhat/jenkins<0:2.387.3.1684911776-3.el8
0:2.387.3.1684911776-3.el8
Xstream Project Xstream<=1.4.19
XStream XStream<1.4.20
IBM Engineering Requirements Management DOORS and DOORS Web Access<=9.7.2.1 - 9.7.2.11
IBM Engineering Requirements Management DOORS and DOORS Web Access<=9.6.1.1 - 9.6.1.13
debian/libxstream-java*
debian/libxstream-java*
debian/libxstream-java*
debian/libxstream-java<=1.4.20-1+deb12u1, <=1.4.21-1, <=1.4.21-2
maven/com.thoughtworks.xstream:xstream<1.4.20
1.4.20

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/jenkins to a version that resolves this vulnerability.

    Fixed in 0:2.387.3.1684911776-3.el8
  2. Upgrade

    Upgrade maven/com.thoughtworks.xstream:xstream to a version that resolves this vulnerability.

    Fixed in 1.4.20
  3. Upgrade

    Upgrade XStream to a version that resolves this vulnerability.

    Fixed in 1.4.20
  4. Compensating control

    Catch StackOverflowError in the client code calling XStream when processing user-supplied input.

Event History

Sep 16, 2022
CVE Published
12:00 AM
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 AM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·10:15 AM
DescriptionSeverityAffected Software
Oct 13, 2022
Data Sourced
via Red Hat·06:10 AM
DescriptionSeverityAffected Software
Dec 30, 2022
Advisory Published
via GitHub·04:58 PM
Data Sourced
via GitHub·04:58 PM
DescriptionSeverityWeaknessAffected Software
Jul 6, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2022-40151?

CVE-2022-40151 is a vulnerability in the XStream package that allows an attacker to cause a denial of service (DOS) attack by crashing the parser with stack overflow.

2

Who is affected by CVE-2022-40151?

Users of XStream who are running the vulnerable version of the software are affected by CVE-2022-40151.

3

What is the severity of CVE-2022-40151?

CVE-2022-40151 has a severity rating of high.

4

How can an attacker exploit CVE-2022-40151?

An attacker can exploit CVE-2022-40151 by supplying content to the XStream parser that causes it to crash with a stack overflow, resulting in a denial of service attack.

5

How can I protect myself from CVE-2022-40151?

To protect yourself from CVE-2022-40151, update XStream to version 2.387.3.1684911776-3.el8 or later, as provided by Red Hat.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203