CVE-2021-21351: XStream is vulnerable to an Arbitrary Code Execution attack
CVE-2021-21351 is not on CISA's Known Exploited Vulnerabilities list as of 4 December 2026, but EPSS estimates a 82.1% chance of exploitation attempts in the next 30 days, higher than 99.7% of all scored vulnerabilities. Public exploit code is available: a Nuclei detection template.
- Exploited in real attacks
- Not confirmed by CISA as of 4 December 2026
- Public exploit code
- A Nuclei detection template
- Chance of exploitation (EPSS)
- 82.1% in the next 30 days, higher than 99.7% of scored vulnerabilities. Scored 5 December 2026
- Severity (CVSS)
- 5.4 Medium (version 3.1)
- Affects
- x-stream xstream
- Type of flaw
- Unrestricted file upload (CWE-434)
- Published
- 22 March 2021
What it is
XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. 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.
Description from the CVE record.
Is CVE-2021-21351 being exploited?
CVE-2021-21351 is not in CISA's catalog, which currently lists 1,814 vulnerabilities. That does not mean it is safe. The catalog only includes cases CISA has confirmed, and the EPSS model, which predicts exploitation from observed attack traffic and other signals, rates this one at 82.1%. Fewer than 1 in 100 scored vulnerabilities rate higher.
Public exploit code
These are public references that anyone, including an attacker, can find. Their existence lowers the skill needed to use the flaw.
| Source | Entry | Published |
|---|---|---|
| Nuclei template | XStream <1.4.16 - Remote Code Execution |
Affected products
- x-stream xstream: < 1.4.16
From the CVE record. Check the vendor advisory for the full list of fixed versions.
What to do
Apply the vendor's fix or mitigation, using the advisories in the sources below. Until it is patched, limit who can reach the affected system, especially from the internet.
How to check whether you are exposed
- Find every copy. List each place x-stream xstream runs, including test systems and anything set up outside IT.
- Compare versions. Match what you find against the affected versions in the vendor advisory.
- Check reachability. An affected system that faces the internet is urgent; one reachable only from inside still matters once an attacker has a foothold.
- Assume it has been scanned. A public Nuclei template exists for this flaw, so finding exposed systems across the internet is automated.
HackDrill
Find out whether this is reachable in your systems.
A version number tells you a system is affected. A hacking drill tells you whether an attacker can actually get in through a flaw like this one in xstream. HackDrill's AI agents attack your product, infrastructure, network and cloud the way modern attackers do, and show you the real, exploitable gaps so you can fix them first.
Other tracked vulnerabilities in x-stream products
| CVE | What it affects | Status | EPSS | Published |
|---|---|---|---|---|
| CVE-2020-26217 | x-stream xstream | Public exploit | 85.0% | 16 November 2020 |
| CVE-2020-26259 | x-stream xstream | No public exploit found | 82.4% | 16 December 2020 |
| CVE-2020-26258 | x-stream xstream | Public exploit | 81.8% | 16 December 2020 |
| CVE-2021-21341 | x-stream xstream | No public exploit found | 77.8% | 22 March 2021 |
| CVE-2021-29505 | x-stream xstream | Public exploit | 77.2% | 28 May 2021 |
| CVE-2021-21346 | x-stream xstream | No public exploit found | 76.4% | 22 March 2021 |
Sources
- CVE record for CVE-2021-21351
- NVD entry
- FIRST EPSS, scores dated 5 December 2026
- x-stream.github.io (x_refsource_MISC)
- x-stream.github.io (x_refsource_MISC)
- github.com (x_refsource_CONFIRM)
- x-stream.github.io (x_refsource_MISC)
- lists.debian.org (mailing-list, x_refsource_MLIST)
- lists.apache.org (mailing-list, x_refsource_MLIST)
- lists.apache.org (mailing-list, x_refsource_MLIST)
- security.netapp.com (x_refsource_CONFIRM)
Machine-readable: /api/cve/CVE-2021-21351.json