CVE-2021-39144
📋 TL;DR
CVE-2021-39144 is a remote code execution vulnerability in XStream library versions before 1.4.18. Attackers with sufficient privileges can execute arbitrary commands on the host by manipulating XML input streams. Only users who haven't implemented XStream's security framework with a minimal type whitelist are affected.
💻 Affected Systems
- XStream
- VMware NSX Manager
- Other applications using XStream library
📦 What is this software?
Communications Billing And Revenue Management Elastic Charging Engine by Oracle
View all CVEs affecting Communications Billing And Revenue Management Elastic Charging Engine →
Communications Billing And Revenue Management Elastic Charging Engine by Oracle
View all CVEs affecting Communications Billing And Revenue Management Elastic Charging Engine →
Communications Cloud Native Core Automated Test Suite by Oracle
View all CVEs affecting Communications Cloud Native Core Automated Test Suite →
Communications Cloud Native Core Binding Support Function by Oracle
View all CVEs affecting Communications Cloud Native Core Binding Support Function →
Communications Cloud Native Core Policy by Oracle
View all CVEs affecting Communications Cloud Native Core Policy →
Communications Unified Inventory Management by Oracle
View all CVEs affecting Communications Unified Inventory Management →
Communications Unified Inventory Management by Oracle
View all CVEs affecting Communications Unified Inventory Management →
Communications Unified Inventory Management by Oracle
View all CVEs affecting Communications Unified Inventory Management →
Communications Unified Inventory Management by Oracle
View all CVEs affecting Communications Unified Inventory Management →
Communications Unified Inventory Management by Oracle
View all CVEs affecting Communications Unified Inventory Management →
Fedora by Fedoraproject
Fedora by Fedoraproject
Fedora by Fedoraproject
Xstream by Xstream
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with attacker gaining complete control over the vulnerable server, allowing data theft, lateral movement, and persistent backdoor installation.
Likely Case
Remote code execution leading to application compromise, data exfiltration, and potential pivot to other internal systems.
If Mitigated
No impact if proper security framework with minimal whitelist is configured as recommended.
🎯 Exploit Status
Public exploit code exists and has been used in real attacks. Exploitation requires the attacker to be able to send malicious XML input to the vulnerable application.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: XStream 1.4.18
Vendor Advisory: https://github.com/x-stream/xstream/security/advisories/GHSA-j9h8-phrw-h4fh
Restart Required: Yes
Instructions:
1. Update XStream dependency to version 1.4.18 or later. 2. For Maven projects: update pom.xml to <version>1.4.18</version>. 3. For Gradle projects: update build.gradle to implementation 'com.thoughtworks.xstream:xstream:1.4.18'. 4. Rebuild and redeploy application. 5. Restart application server.
🔧 Temporary Workarounds
Implement XStream Security Framework
allConfigure XStream with a minimal type whitelist to prevent deserialization of dangerous classes
XStream xstream = new XStream();
xstream.allowTypes(new Class[]{MyClass1.class, MyClass2.class});
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all XML input
- Deploy network segmentation and restrict access to vulnerable applications
🔍 How to Verify
Check if Vulnerable:
Check application dependencies for XStream version <1.4.18. For Java applications: check pom.xml, build.gradle, or lib directory for xstream JAR files.
Check Version:
For Maven: mvn dependency:tree | grep xstream. For deployed JAR: java -cp xstream-*.jar com.thoughtworks.xstream.XStream --version
Verify Fix Applied:
Verify XStream version is 1.4.18 or higher in dependencies. Test application with known malicious XML payloads to ensure they're rejected.
📡 Detection & Monitoring
Log Indicators:
- Unusual XML parsing errors
- Java class loading exceptions for unexpected classes
- Process execution from application context
Network Indicators:
- Malformed XML payloads in HTTP requests
- Unusual outbound connections from application server
SIEM Query:
source="application.logs" AND ("XStream" OR "deserialization") AND ("error" OR "exception" OR "ClassNotFoundException")
🔗 References
- http://packetstormsecurity.com/files/169859/VMware-NSX-Manager-XStream-Unauthenticated-Remote-Code-Execution.html
- https://github.com/x-stream/xstream/security/advisories/GHSA-j9h8-phrw-h4fh
- https://lists.debian.org/debian-lts-announce/2021/09/msg00017.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/22KVR6B5IZP3BGQ3HPWIO2FWWCKT3DHP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PVPHZA7VW2RRSDCOIPP2W6O5ND254TU7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGXIU3YDPG6OGTDHMBLAFN7BPBERXREB/
- https://security.netapp.com/advisory/ntap-20210923-0003/
- https://www.debian.org/security/2021/dsa-5004
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://x-stream.github.io/CVE-2021-39144.html
- http://packetstormsecurity.com/files/169859/VMware-NSX-Manager-XStream-Unauthenticated-Remote-Code-Execution.html
- https://github.com/x-stream/xstream/security/advisories/GHSA-j9h8-phrw-h4fh
- https://lists.debian.org/debian-lts-announce/2021/09/msg00017.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/22KVR6B5IZP3BGQ3HPWIO2FWWCKT3DHP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PVPHZA7VW2RRSDCOIPP2W6O5ND254TU7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGXIU3YDPG6OGTDHMBLAFN7BPBERXREB/
- https://security.netapp.com/advisory/ntap-20210923-0003/
- https://www.debian.org/security/2021/dsa-5004
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://x-stream.github.io/CVE-2021-39144.html
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-39144