Buffer Over-read Vulnerability in libxml2
Summary
CVE-2024-34459: An issue was discovered in xmllint (from libxml2) before 2.11.8 and 2.12.x before 2.12.7. Affects libxml2 across 2 version ranges.
< 2.11.8-r0
< 58a973c40ba927e5ad941789723da7c47a2d60e3
Fixed in 2.11.8-r0. 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 open-source library for parsing and manipulating XML files. It provides various functionalities for handling XML data, including parsing, validation, and XPath querying. The library is commonly used in applications and frameworks that deal with XML data, such as web browsers, document editors, and content management systems. However, a vulnerability has been discovered in libxml2 that can lead to a buffer over-read when formatting error messages with the xmllint utility's --htmlout option.
Vulnerability Detail
The buffer over-read vulnerability in libxml2 affects versions before 2.11.8 and 2.12.x before 2.12.7. When using xmllint with the --htmlout option to format error messages, a formatting error can occur in the xmlHTMLPrintFileContext function in xmllint.c. This error can result in the program reading beyond the bounds of a buffer, potentially exposing sensitive information or causing a crash. An attacker could exploit this vulnerability by crafting a malicious XML file and tricking a user or application into processing it with xmllint.
How To Fix
Minimum fixed version
2.11.8-r0
This is the first release that contains the fix.
sudo apk add --upgrade libxml2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the official fix by updating libxml2 to a patched version.
Conclusion
The buffer over-read vulnerability in libxml2 can potentially expose sensitive information or cause a crash when formatting error messages with xmllint's --htmlout option. It is crucial to update libxml2 to a patched version to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for libxml2 →
FAQ
libxml2 is an open-source library for parsing and manipulating XML files. It is widely used in various applications and frameworks that deal with XML data.
xmllint is a command-line utility provided by libxml2 for parsing and validating XML files. It is commonly used for debugging and testing XML-related functionalities.
A buffer over-read vulnerability occurs when a program reads data from a buffer beyond its intended boundaries. This can lead to the exposure of sensitive information or cause the program to crash.
An attacker can exploit this vulnerability by crafting a malicious XML file and tricking a user or application into processing it with xmllint. This can lead to the exposure of sensitive information or a denial-of-service condition.
No, there is no known workaround for this vulnerability. It is recommended to apply the official fix by updating libxml2 to a patched version.
Related vulnerabilities
Recent vulnerabilities recorded for libxml2.