CVE-2021-21349: Server-Side Forgery Request in com.thoughtworks.xstream:xstream

Summary

22/03/2021
Yes i
Moderate
6.1

CVE-2021-21349: Impact The vulnerability may allow a remote attacker to request data from internal resources that are not publicly available only by manipulating the processed input stream. Affects com.thoughtworks.xstream:xstream versions < 1.4.16. Fixed in 1.4.16. How to fix ↓

Also tracked for

The same CVE-2021-21349 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

com.thoughtworks.xstream:xstream is an open-source library for serializing Java objects to XML and back. It provides a simple API for converting objects to XML and vice versa. This vulnerability affects versions prior to 1.4.16. The library is vulnerable to a Server-Side Forgery Request (SSFR) attack when unmarshalling with XStream. An attacker can manipulate the input stream to access data streams from arbitrary URLs, including internal resources that are not publicly available. This can lead to unauthorized access to sensitive information.

Vulnerability Detail

The vulnerability allows remote attackers to request data from internal resources by manipulating the processed input stream. This can be achieved through unmarshalling with XStream, which can be tricked into accessing data streams from arbitrary URLs. The impact of this vulnerability can be mitigated by setting up XStream's security framework with a whitelist limited to the minimal required types. Users who have followed this recommendation are not affected. For more technical details and steps to reproduce the vulnerability, refer to the XStream documentation for CVE-2021-21349.

How To Fix

Latest published version: 1.4.21 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.16

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you are unable to immediately update to version 1.4.16, you can implement workarounds provided by XStream. These workarounds vary depending on the XStream version you are using. Refer to the XStream documentation for the specific workaround applicable to your version.

Conclusion

CVE-2021-21349 is a vulnerability in com.thoughtworks.xstream:xstream that allows remote attackers to request data from internal resources. It can be mitigated by setting up XStream's security framework with a whitelist and updating to version 1.4.16 or later. For more information and support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for com.thoughtworks.xstream:xstream →

Share this vulnerability

FAQ

com.thoughtworks.xstream:xstream is an open-source library for serializing Java objects to XML and back. It provides a simple API for converting objects to XML and vice versa.

The vulnerability allows remote attackers to request data from internal resources by manipulating the processed input stream. This can lead to unauthorized access to sensitive information.

The impact of this vulnerability can be mitigated by setting up XStream's security framework with a whitelist limited to the minimal required types. Users who have followed this recommendation are not affected.

To fix this vulnerability, update com.thoughtworks.xstream:xstream to version 1.4.16 or later. This version includes patches to address the vulnerability.

If you are unable to immediately update to version 1.4.16, you can implement workarounds provided by XStream. These workarounds vary depending on the XStream version you are using. Refer to the XStream documentation for the specific workaround applicable to your version.

Related vulnerabilities

Recent vulnerabilities recorded for com.thoughtworks.xstream:xstream.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 1.4.21 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.16

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback