CVE-2024-40896
NoneCVSS
—
EPSS
1.2%
Published
Dec 23, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used library that reads XML files lets attackers secretly access internal documents or network resources even when developers tried to block such access.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- XXE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The SAX parser emits events for external entities even when custom handlers set the checked flag to suppress entity content, bypassing intended XXE protections in libxml2.
Why it matters to the business
Applications that parse untrusted XML using affected libxml2 versions remain exposed to file disclosure, internal network reconnaissance, and potential denial of service, increasing breach and compliance risk across dependent software ecosystems.
How an attack unfolds
An attacker supplies a crafted XML document containing external entity declarations to any application using the vulnerable libxml2 SAX interface; the parser ignores the handler's checked override and resolves the external entities, leaking local file contents or performing SSRF.
How to fix it
Upgrade libxml2 to the commit 1a8932303969907f6572b1b6aac4081c56adb5c6 or later releases 2.11.9, 2.12.9, or 2.13.3; rebuild and redeploy all dependent applications; disable external entity resolution at the application layer until patches are applied.
How to confirm the fix worked
Confirm installed libxml2 version is at or above the fixed commit; run regression tests with XXE payloads that previously triggered entity expansion and verify no external content is emitted; monitor build pipelines for the updated library hash.
Typical attack path
- Identify application endpoint or API that accepts XML input processed via libxml2 SAX
- Craft XML payload declaring external entities pointing to file:// or http:// targets
- Submit payload and observe whether entity content is returned or processed despite handler configuration
- Exfiltrate sensitive data or chain with further internal requests
How to detect it
Review application logs for unexpected external entity resolution attempts or file reads triggered during XML parsing; correlate with web request patterns that include XML payloads containing DOCTYPE declarations.
What your security team should do
- Immediately inventory all software using libxml2 and schedule upgrades to the fixed commit
- Implement input sanitization and disable external entities in SAX handlers as defense-in-depth
- Add libxml2 version checks to CI/CD and container scanning processes
- Review logs for unusual XML parsing behavior or file access patterns originating from XML handlers
The record
In libxml2 2.11 before 2.11.9, 2.12 before 2.12.9, and 2.13 before 2.13.3, the SAX parser can produce events for external entities even if custom SAX handlers try to override entity content (by setting "checked"). This makes classic XXE attacks possible.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | openjdk-11-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-8-openj9 | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-dbg | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-default-jdk | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-default-jvm | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-doc | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-jre | 0 | 0.53.0-r1 |
| SUSE:Package Hub 15 SP6 | qt6-webengine | 0 | 6.6.3-bp156.2.3.1 |
| SUSE:Package Hub 15 SP6 | qt6-webengine-docs | 0 | 6.6.3-bp156.2.3.1 |
| Ubuntu:24.10 | libxml2 | 0 | 2.12.7+dfsg-3ubuntu0.1 |
| openSUSE:Leap 15.6 | qt6-webengine | 0 | 6.6.3-bp156.2.3.1 |
| openSUSE:Leap 15.6 | qt6-webengine-docs | 0 | 6.6.3-bp156.2.3.1 |
| openSUSE:Tumbleweed | libxml2 | 0 | 2.12.9-1.1 |
| openSUSE:Tumbleweed | qt6-webengine | 0 | 6.8.1-2.1 |
Related vulnerabilities
- CVE-2026-21945 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise… Also affects openjdk-11-openj9
- CVE-2026-21932 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise… Also affects openjdk-11-openj9
- CVE-2026-21933 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise… Also affects openjdk-11-openj9
- CVE-2026-21925 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise… Also affects openjdk-11-openj9
- CVE-2025-0509 Sparkle Signing Checks Bypass Also affects openjdk-11-openj9
- CVE-2025-21502 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise… Also affects openjdk-11-openj9
- CVE-2024-54534 The issue was addressed with improved memory handling. Also affects openjdk-11-openj9
- CVE-2024-47775 GStreamer is a library for constructing graphs of media-handling components. Also affects openjdk-11-openj9