CVE-2024-28757

7.5 HIGH

📋 TL;DR

CVE-2024-28757 is an XML Entity Expansion vulnerability in libexpat that allows attackers to cause denial of service through resource exhaustion when external parsers are created via XML_ExternalEntityParserCreate. This affects applications using libexpat versions through 2.6.1 for XML parsing. The vulnerability is particularly relevant for systems processing untrusted XML input.

💻 Affected Systems

Products:
  • libexpat
  • applications using libexpat for XML parsing
Versions: libexpat versions through 2.6.1
Operating Systems: Linux, Windows, macOS, BSD, any OS using libexpat
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when using XML_ExternalEntityParserCreate function. Applications must be configured to parse external entities.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service through memory exhaustion, potentially crashing the application or system processing XML.

🟠

Likely Case

Application instability or crashes when processing malicious XML payloads, leading to service disruption.

🟢

If Mitigated

Minimal impact if XML input is validated and controlled, or if external entity parsing is disabled.

🌐 Internet-Facing: MEDIUM - Applications accepting XML input from untrusted sources are vulnerable to DoS attacks.
🏢 Internal Only: LOW - Risk is lower for internal systems with controlled XML input sources.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof of concept available in GitHub issues. Exploitation requires sending malicious XML to vulnerable parser.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libexpat 2.6.2 and later

Vendor Advisory: https://github.com/libexpat/libexpat/pull/842

Restart Required: Yes

Instructions:

1. Update libexpat to version 2.6.2 or later. 2. Rebuild applications linked against libexpat. 3. Restart affected services.

🔧 Temporary Workarounds

Disable external entity parsing

all

Configure XML parsers to disable external entity resolution

Set XML_PARSE_NOENT flag to 0 in parser configuration

Limit XML input size

all

Implement input validation to restrict XML payload size

🧯 If You Can't Patch

  • Implement strict XML input validation and sanitization
  • Deploy network controls to filter malicious XML payloads

🔍 How to Verify

Check if Vulnerable:

Check libexpat version: expat --version or check package manager

Check Version:

expat --version 2>/dev/null || dpkg -l | grep libexpat || rpm -qa | grep expat

Verify Fix Applied:

Verify libexpat version is 2.6.2 or later

📡 Detection & Monitoring

Log Indicators:

  • Application crashes during XML parsing
  • Memory exhaustion warnings
  • XML parsing errors

Network Indicators:

  • Large XML payloads with nested entities
  • Repeated XML requests causing resource spikes

SIEM Query:

source="application_logs" AND ("XML_ExternalEntityParserCreate" OR "expat" OR "memory exhaustion")

🔗 References

📤 Share & Export