Vulnerabilities / CVE-2021-21342

critical

CVE-2021-21342

XStream: SSRF via crafted input stream

Published Modified CWE 502, 918
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GHSA5.3CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Red Hat7.4CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Bitnami9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami. Rated lower by Amazon (high), GHSA (medium), Red Hat (medium), Ubuntu (medium).

Description

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability where 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 a server-side forgery request. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.16.

Affected packages and fixed versions

SourcePackageFixed in
bitnami::Bitnami Vulnerability Databaseactivemq5.15.14
amazon linux 2xstream, xstream-javadoc1.3.1-16.amzn2.0.2
debian 10libxstream-java1.4.11.1-1+deb10u3
debian 11libxstream-java1.4.15-2
debian 12libxstream-java1.4.15-2
debian 13libxstream-java1.4.15-2
debian 14libxstream-java1.4.15-2
debian 9libxstream-java1.4.11.1-1+deb9u2
echolibxstream-java1.4.15-2
maven::GitHub Security Advisory Mavencom.thoughtworks.xstream:xstream1.4.16
Red Hatxstream, xstream-javadocno fix listed
ubuntu 14.04-ESMlibxstream-java1.4.7-1ubuntu0.1+esm2
Show all 28 entries from 26 sources
SourcePackageFixed in
bitnami::Bitnami Vulnerability Databaseactivemq5.15.14
amazon linux 2xstream1.3.1-16.amzn2.0.2
amazon linux 2xstream-javadoc1.3.1-16.amzn2.0.2
debian 10libxstream-java1.4.11.1-1+deb10u3
debian 11libxstream-java1.4.15-2
debian 12libxstream-java1.4.15-2
debian 13libxstream-java1.4.15-2
debian 14libxstream-java1.4.15-2
debian 9libxstream-java1.4.11.1-1+deb9u2
echolibxstream-java1.4.15-2
maven::GitHub Security Advisory Mavencom.thoughtworks.xstream:xstream1.4.16
Red Hatxstreamno fix listed
Red Hatxstream-javadocno fix listed
ubuntu 14.04-ESMlibxstream-java1.4.7-1ubuntu0.1+esm2
ubuntu 16.04-ESMlibxstream-java1.4.8-1ubuntu0.1+esm3
ubuntu 18.04libxstream-java1.4.11.1-1~18.04.2
ubuntu 18.04-ESMlibxstream-java1.4.11.1-1~18.04.2
ubuntu 20.04libxstream-java1.4.11.1-1ubuntu0.2
ubuntu 20.04-ESMlibxstream-java1.4.11.1-1ubuntu0.2
ubuntu 20.10libxstream-java1.4.11.1-2ubuntu0.1
ubuntu 21.04libxstream-java1.4.15-1ubuntu0.1
ubuntu 21.10libxstream-java1.4.15-2
ubuntu 22.04libxstream-java1.4.15-2
ubuntu 22.10libxstream-java1.4.15-2
ubuntu 23.04libxstream-java1.4.15-2
ubuntu 23.10libxstream-java1.4.15-2
ubuntu 24.04libxstream-java1.4.15-2
ubuntu 24.10libxstream-java1.4.15-2

References

All 25 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.