VDB

CVE-2022-41966

CVE-2022-41966 PUBLISHED CVSS 8.2 HIGH

XStream Denial of Service via stack overflow

Reported by github_m · Published December 27, 2022

xstream is fixed in 1.4.20 (Maven Central)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
com.thoughtworks.xstream:xstreamMaven Central1.4.20
xstreamAmazon Linux1.3.1-16.amzn2.0.1
xstream-javadocAmazon Linux1.3.1-16.amzn2.0.1
xstreamxstream1.4.20

Risk scores

CVSS 3.1
8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Affected products

VendorProductVersions
x-streamxstream< 1.4.20
amazon:2xstream0
amazon:2xstream-javadoc0
Mavencom.thoughtworks.xstream:xstream0
x-streamxstream0

Timeline

  • Dec 27, 2022 CVE Published
  • Dec 28, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 17, 2026 Security Advisory (36 in total, the first dated here)
  • Jun 15, 2026 Coalition ESS Score
  • Nov 22, 2026 Distribution Patch (35 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-41966
vulnetix vdb fixes CVE-2022-41966

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-41966/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›