CVE-2022-23990
📋 TL;DR
CVE-2022-23990 is an integer overflow vulnerability in Expat (libexpat) XML parser library that can lead to denial of service or arbitrary code execution. Any application using vulnerable versions of libexpat for XML parsing is affected, particularly web servers, embedded systems, and XML processing tools.
💻 Affected Systems
- Expat (libexpat)
- Applications using libexpat for XML parsing
📦 What is this software?
Communications Metasolv Solution by Oracle
Fedora by Fedoraproject
Fedora by Fedoraproject
Libexpat by Libexpat Project
Nessus by Tenable
Nessus by Tenable
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise
Likely Case
Denial of service through application crash
If Mitigated
Limited impact with proper input validation and sandboxing
🎯 Exploit Status
Exploitation requires specially crafted XML input to trigger the integer overflow
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.4.4 and later
Vendor Advisory: https://github.com/libexpat/libexpat/pull/551
Restart Required: Yes
Instructions:
1. Update libexpat to version 2.4.4 or later
2. Recompile applications using libexpat
3. Restart affected services
🔧 Temporary Workarounds
Input validation
allValidate and sanitize XML input before processing
Memory limits
linuxSet memory limits on XML parsing processes
ulimit -v [LIMIT]
🧯 If You Can't Patch
- Isolate XML processing services in containers or VMs
- Implement network segmentation to limit exposure
🔍 How to Verify
Check if Vulnerable:
Check libexpat version with: expat --version or ldd on binary to check linked library version
Check Version:
expat --version | grep -i expat || strings /usr/lib/libexpat.so | grep -i expat
Verify Fix Applied:
Verify libexpat version is 2.4.4 or higher
📡 Detection & Monitoring
Log Indicators:
- Application crashes during XML parsing
- Memory allocation failures
Network Indicators:
- Unusual XML payloads with large element counts
SIEM Query:
search 'XML parsing error' OR 'libexpat crash' OR 'segmentation fault' during XML processing
🔗 References
- https://cert-portal.siemens.com/productcert/pdf/ssa-484086.pdf
- https://github.com/libexpat/libexpat/pull/551
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/34NXVL2RZC2YZRV74ZQ3RNFB7WCEUP7D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R7FF2UH7MPXKTADYSJUAHI2Y5UHBSHUH/
- https://security.gentoo.org/glsa/202209-24
- https://www.debian.org/security/2022/dsa-5073
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.tenable.com/security/tns-2022-05
- https://cert-portal.siemens.com/productcert/pdf/ssa-484086.pdf
- https://github.com/libexpat/libexpat/pull/551
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/34NXVL2RZC2YZRV74ZQ3RNFB7WCEUP7D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R7FF2UH7MPXKTADYSJUAHI2Y5UHBSHUH/
- https://security.gentoo.org/glsa/202209-24
- https://www.debian.org/security/2022/dsa-5073
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.tenable.com/security/tns-2022-05