# CVE-2022-41966: XStream Denial of Service via stack overflow

- Severity: High 8.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 9.35%, higher than 95% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-12-27T23:07:54.048Z
- Modified: 2026-06-17T05:04:09.080Z
- Also known as: GHSA-j563-grx4-pjpv
- Weaknesses: CWE-120, CWE-121, CWE-502, CWE-674
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- x-stream xstream: < 1.4.20
- com.thoughtworks.xstream:xstream (Maven): before 1.4.20
- xstream xstream: before 1.4.20

## Every score

- GitHub_M: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://x-stream.github.io/CVE-2022-41966.html> (exploit, vendor-advisory, web)
- <https://github.com/x-stream/xstream/security/advisories/GHSA-j563-grx4-pjpv> (mitigation, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20230216-0005/> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-41966> (advisory)
- <https://github.com/x-stream/xstream> (package)

## Sources

- CVE List: [CVE-2022-41966](https://www.cve.org/CVERecord?id=CVE-2022-41966), CVE Terms of Use, modified 2025-04-11
- GitHub Advisory Database: [GHSA-j563-grx4-pjpv](https://github.com/advisories/GHSA-j563-grx4-pjpv), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2022-41966](https://nvd.nist.gov/vuln/detail/CVE-2022-41966), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-41966 · Whole record: https://cve.day/CVE-2022-41966.json · Rebuilt by cve.day 2026-11-25T22:58:17.908Z
