CVE-2022-41966
xstream: Denial of Service by injecting recursive collections or maps based on element's hash values raising a stack overflow
Overview
Description
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-120, CWE-121, CWE-502, CWE-674
Affected packages · 4
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Maven | com.thoughtworks.xstream:xstream | <1.4.20 | 1.4.20 |
| Seal Maven | com.thoughtworks.xstream:xstream | >=1.3.1+sp0, <1.3.1+sp999>=1.4.11.1+sp0, <1.4.11.1+sp3 | 1.3.1+sp9991.4.11.1+sp3 |
| Seal Maven | seal.sp1.com.thoughtworks.xstream:xstream | >=1.3.1, <1.3.1+sp999>=1.4.11.1, <1.4.11.1+sp999 | 1.3.1+sp9991.4.11.1+sp999 |
| Seal Maven | seal.sp2.com.thoughtworks.xstream:xstream | >=1.4.11.1, <1.4.11.1+sp999 | 1.4.11.1+sp999 |
Open a package to see all its vulnerabilities.
Operating systems · 16 fixes
Red Hat 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | jenkins | affected | — |
| 8 | jenkins | 0:2.401.1.1685677065-1.el8 | RHSA-2023:3625 |
| 8 | jenkins-2-plugins | 0:4.10.1685679861-1.el8 | RHSA-2023:3625 |
SUSE Linux Enterprise 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | xstream | 1.4.20-150200.3.25.1 | SUSE-SU-2023:1673-1 |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | libxstream-java | 1.4.11.1-1+deb10u4 |
| 11 | libxstream-java | 1.4.15-3+deb11u2 |
| 12 | libxstream-java | 1.4.20-1 |
| 13 | libxstream-java | 1.4.20-1 |
| 14 | libxstream-java | 1.4.20-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| libxstream-java | 1.4.20-1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | xstream +3 | 1.4.20-1.1 | openSUSE-SU-2024:12796-1 |
ubuntu 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | libxstream-java | 1.4.11.1-1+deb10u4build0.18.04.1 |
| 18.04-ESM | libxstream-java | 1.4.11.1-1+deb10u4build0.18.04.1 |
| 20.04 | libxstream-java | 1.4.11.1-1ubuntu0.3 |
| 20.04-ESM | libxstream-java | 1.4.11.1-1ubuntu0.3 |
| 22.04 | libxstream-java | 1.4.18-2ubuntu0.1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-41966
- github.com https://github.com/x-stream/xstream
- github.com https://github.com/x-stream/xstream/security/advisories/GHSA-j563-grx4-pjpv
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-41966
- security.netapp.com https://security.netapp.com/advisory/ntap-20230216-0005/
- ubuntu.com https://ubuntu.com/security/notices/USN-5946-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-41966
- x-stream.github.io https://x-stream.github.io/CVE-2022-41966.html
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.