Skip to main content

Uncontrolled Recursion

CVE-2022-41966

Severity High
Score 7.5/10

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 (DoS) only via manipulation of the processed input stream. The attack uses the hash code implementation for collections and maps to force recursive hash calculation, causing a stack overflow. 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 to 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.

  • LOW
  • NETWORK
  • NONE
  • UNCHANGED
  • NONE
  • NONE
  • NONE
  • HIGH

CWE-674 - Uncontrolled Recursion

The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack.

Advisory Timeline

  • Published