Heap Buffer Over-read Vulnerability in Expat Package
Summary
ALPINE-CVE-2026-77214: libexpat before commit 13c5f63 contains a heap buffer over-read vulnerability in xmlparse.c. Affects expat versions < 2.9.0-r0. Fixed in 2.9.0-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
Expat is an XML parsing library widely used in various applications for its efficiency and ease of use. It provides a simple API for parsing XML documents and is known for its performance. However, the library is susceptible to a heap buffer over-read vulnerability that can lead to serious security issues if not addressed promptly.
Vulnerability Detail
The vulnerability arises from a flaw in the xmlparse.c file of the Expat library, where the XML_ParseBuffer function advances the parse buffer end using a caller-supplied length that is not validated against the allocated buffer size. This allows repeated calls to XML_ParseBuffer to move the buffer end past the allocated memory, leading to out-of-bounds reads. Such over-reads can disclose sensitive adjacent heap memory, including pointers and function addresses, potentially allowing attackers to bypass Address Space Layout Randomization (ASLR) and create further exploitation vectors.
How To Fix
Minimum fixed version
2.9.0-r0
This is the first release that contains the fix.
sudo apk add --upgrade expat
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds available for this vulnerability other than updating to the patched version of the Expat library.
Conclusion
The heap buffer over-read vulnerability in the Expat package poses significant security risks, including the potential disclosure of sensitive memory information. It is essential to update to the patched version to protect your applications from exploitation. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your software.
See every vulnerability recorded for expat →
FAQ
It is a heap buffer over-read vulnerability that can lead to the disclosure of sensitive memory information.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
If exploited, this vulnerability can allow attackers to read sensitive information from memory, potentially leading to further exploitation of the application.
Yes, a patch is available in version 2.9.0-r0 of the Expat package.
While there are no specific workarounds, it is crucial to prioritize updating the package to mitigate the risk associated with this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for expat.