CVE-2021-39144: XStream Remote Code Execution
XStream · listed in the CISA catalog of actively exploited vulnerabilities since 2023-03-10.
- CVSS v3.1 (CVE record)
- 8.5
- high
- EPSS (exploit probability, 30 days)
- 98%
- among the highest 0.1% of all CVEs
- Added to CISA KEV
- 2023-03-10
- US federal due date 2023-03-31
- Ubuntu priority
- medium
CVE-2021-39144 explained
CVE-2021-39144 is a remote code execution flaw in the XStream library, which serializes Java objects to XML and back. A remote attacker with sufficient rights can run commands on the host by manipulating the input stream XStream processes. It is listed in the CISA Known Exploited Vulnerabilities catalog, so patching should be a priority.
Impact
An attacker with low privileges can exploit this over the network without user interaction. Attack complexity is high. Success can lead to command execution on the host, with high impact to confidentiality, integrity and availability, and the effect can reach beyond the vulnerable component. Applications that configured XStream's security framework with a whitelist limited to the minimal required types are not affected.
Who is affected
The affected source package is libxstream-java. On Ubuntu 18.04 LTS it is fixed in 1.4.11.1-1+deb10u4build0.18.04.1. On Ubuntu 20.04 LTS it is fixed in 1.4.11.1-1ubuntu0.3. Both fixes are in the standard archive. Standard support has ended for both releases, and further fixes for them come only through Ubuntu Pro (ESM).
Written with AI from the data on this page and checked against it automatically.
Official description
XStream is a simple library to serialize objects to XML and back again. In affected versions this vulnerability may allow a remote attacker has sufficient rights to execute commands of the 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.
XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
CISA required action: Apply updates per vendor instructions.
CISA notes
Upstream versions (CVE record)
From the CVE record published by the vendor or CVE numbering authority.
- x-stream xstreamAffectedFixed in
- < 1.4.18
not stated
| Product | Affected | Fixed in |
|---|---|---|
| x-stream xstream |
| not stated |
Ubuntu and Debian releases
A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.
Ubuntu 20.04 LTS·libxstream-java
Fixed: 1.4.11.1-1ubuntu0.3
Ubuntu 18.04 LTS·libxstream-java
Fixed: 1.4.11.1-1+deb10u4build0.18.04.1
What to do
- Update
libxstream-javato the fixed version for your release. - Restart all Java applications and services that load XStream so they use the patched library.
- Configure XStream's security framework with a whitelist limited to the minimal required types.
- Limit network exposure of services that deserialize XML input with XStream.
- Plan Ubuntu Pro (ESM) coverage or a release upgrade, since standard support for these releases has ended.
Written with AI from the data on this page and checked against it automatically.
Check and fix on a server
Run on each Ubuntu or Debian server. Replace libxstream-java with the source package from the table above.
1. Show installed packages built from the source package, with their versions
dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="libxstream-java"'2. Compare each installed version with the fixed version for your release from the table
I=INSTALLED_VERSION; F=FIXED_VERSION # replace both
dpkg --compare-versions "$I" lt "$F"; case $? in 0) echo vulnerable ;; 1) echo "fixed or newer" ;; *) echo "check the versions" ;; esac3. Install the fix
sudo apt update && sudo apt install --only-upgrade $(dpkg-query -W -f='${binary:Package} ${source:Package}\n' | awk '$2=="libxstream-java"{print $1}')Services keep running the old code until they are restarted – restart the affected service or check with needrestart.
CISA's assessment (SSVC)
- Exploitation
- Exploited in the wild
- Automatable
- No – each attack needs manual steps
- Technical impact
- Total – full control of the component or total information disclosure
Weakness: CWE-94 Improper Control of Generation of Code ('Code Injection'), CWE-502 Deserialization of Untrusted Data
Questions about CVE-2021-39144
- Is this vulnerability exploited in the wild?
- Yes. CISA added CVE-2021-39144 to its Known Exploited Vulnerabilities catalog on 2023-03-10. The required action is to apply updates per vendor instructions. Known ransomware use is listed as unknown.
- Am I safe if I use an XStream whitelist?
- According to the description, users who set up XStream's security framework with a whitelist limited to the minimal required types are not affected. You should still apply the package update.
- Do I need to restart anything after updating?
- Yes. Running Java applications keep using the old library until they are restarted. Restart every service that uses
libxstream-javaafter the update.
Written with AI from the data on this page and checked against it automatically.
References
Other advisories
Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.