Critical Use-After-Free Vulnerability in libxml2: CVE-2024-56171
Summary
UBUNTU-CVE-2024-56171: libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables in xmlschemas.c. Affects libxml2 versions < 2.9.1+dfsg1-3ubuntu4.13+esm7. Fixed in 2.9.1+dfsg1-3ubuntu4.13+esm7. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
libxml2 is a widely used XML parsing library that provides a range of functionalities for processing XML documents. It is known for its performance and compliance with standards. However, it has been found to be vulnerable to a use-after-free issue, which can lead to potential exploitation if not addressed promptly.
Vulnerability Detail
The vulnerability identified as CVE-2024-56171 affects libxml2 versions prior to 2.12.10 and 2.13.x before 2.13.6. It is caused by a use-after-free condition in the functions xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables within xmlschemas.c. This vulnerability can be exploited by an attacker through a crafted XML document that is validated against an XML schema with specific identity constraints, or by using a specially crafted XML schema. The ramifications of this vulnerability include potential memory corruption, leading to application crashes or arbitrary code execution, making it critical to address.
How To Fix
Minimum fixed version
2.9.1+dfsg1-3ubuntu4.13+esm7
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libxml2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid processing untrusted XML documents or schemas until the library is updated. Additionally, implementing strict validation checks on XML inputs may help mitigate the risk of exploitation.
Conclusion
The CVE-2024-56171 vulnerability in libxml2 poses significant risks due to its potential for exploitation through crafted XML documents. It is crucial for users to update to the latest patched versions to safeguard their applications against this critical issue.
See every vulnerability recorded for libxml2 →
FAQ
CVE-2024-56171 is a critical vulnerability in the libxml2 library that allows for a use-after-free condition, potentially leading to memory corruption and arbitrary code execution.
You can use Vulert to monitor and alert in real-time for open-source vulnerabilities. Visit Vulert Scanner to check if your application is affected without needing to sign up.
Versions of libxml2 prior to 2.12.10 and 2.13.x before 2.13.6 are affected by this vulnerability.
The CVSS score of CVE-2024-56171 is 7.8, indicating a high severity level.
If immediate updates are not possible, avoid processing untrusted XML documents and implement strict validation checks on XML inputs as a temporary measure.
Related vulnerabilities
Recent vulnerabilities recorded for libxml2.