Skip to main content
← All vulnerabilities
CVE-2022-41966GHSA-J563-GRX4-PJPV

XStream Denial of Service via stack overflow

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.4.20
1 proof of concept on GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • x-stream xstream

    fixed in 1.4.20

  • com.thoughtworks.xstream:xstreamMaven

    fixed in 1.4.20

References 3

GitHub · x-stream/xstream

x-stream.github.io

GitHub · 111ddea/Xstream_cve-2022-41966