CVE-2024-45491

9.8 CRITICAL

📋 TL;DR

CVE-2024-45491 is an integer overflow vulnerability in libexpat's XML parsing library that can lead to heap buffer overflow on 32-bit platforms. This allows attackers to potentially execute arbitrary code or cause denial of service by providing malicious XML input. Any application using vulnerable libexpat versions on 32-bit systems is affected.

💻 Affected Systems

Products:
  • libexpat
  • Any software using libexpat library
Versions: libexpat versions before 2.6.3
Operating Systems: 32-bit Linux systems, 32-bit Windows systems, Any 32-bit platform
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects 32-bit platforms where UINT_MAX equals SIZE_MAX. 64-bit systems are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Denial of service through application crashes, with potential for limited code execution in memory-corrupted processes.

🟢

If Mitigated

Application crashes without code execution if exploit attempts are blocked or memory protections are enabled.

🌐 Internet-Facing: HIGH - XML parsing is common in web services and network-facing applications.
🏢 Internal Only: MEDIUM - Internal applications processing XML from untrusted sources remain vulnerable.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting malicious XML to trigger the integer overflow. No public exploit code has been released as of analysis.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libexpat 2.6.3 and later

Vendor Advisory: https://github.com/libexpat/libexpat/releases/tag/R_2_6_3

Restart Required: Yes

Instructions:

1. Update libexpat to version 2.6.3 or later. 2. For Linux: Use package manager (apt-get update && apt-get upgrade libexpat1). 3. For Windows: Download from libexpat GitHub releases. 4. Rebuild any statically linked applications. 5. Restart affected services.

🔧 Temporary Workarounds

Disable XML external entity processing

all

Configure XML parsers to disable external entity resolution which may reduce attack surface

Set XML_PARSE_NOENT flag to 0 in expat configuration

Input validation and sanitization

all

Validate and sanitize XML input before processing

🧯 If You Can't Patch

  • Deploy web application firewall (WAF) with XML payload inspection rules
  • Isolate vulnerable systems in network segments with strict access controls

🔍 How to Verify

Check if Vulnerable:

Check libexpat version: expat --version or ldd /path/to/application | grep expat

Check Version:

expat --version 2>/dev/null || strings /usr/lib/libexpat.so* | grep -i 'expat_[0-9]' | head -1

Verify Fix Applied:

Verify version is 2.6.3 or higher: expat --version | grep -q '2\.6\.[3-9]\|2\.[7-9]\|3\.'

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults
  • Memory corruption errors in system logs
  • Unusual XML parsing errors

Network Indicators:

  • Large or malformed XML payloads to XML endpoints
  • Repeated XML parsing attempts causing crashes

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "SIGSEGV" OR "heap corruption") AND process="*expat*"

🔗 References

📤 Share & Export