Memory Corruption Vulnerability in libxslt: CVE-2019-18197
Summary
ALPINE-CVE-2019-18197: In xsltCopyText in transform.c in libxslt 1.1.33, a pointer variable isn't reset under certain circumstances. Affects libxslt versions < 1.1.33-r2. Fixed in 1.1.33-r2. 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
libxslt is a widely used library for transforming XML documents into various formats using XSLT (Extensible Stylesheet Language Transformations). It is known for its performance and flexibility, allowing developers to create complex transformations efficiently. However, libxslt versions prior to 1.1.33-r3 are vulnerable to a memory corruption issue that can lead to serious security risks.
Vulnerability Detail
In libxslt version 1.1.33, specifically in the function xsltCopyText within transform.c, a pointer variable is not reset under certain conditions. If the memory area in question is freed and reused in a specific manner, it can lead to a failure in bounds checking. This may allow for memory outside of a designated buffer to be written to, potentially leading to memory corruption or the disclosure of uninitialized data. The CVSS score for this vulnerability is 7.5, indicating a high severity level.
How To Fix
Minimum fixed version
1.1.33-r2
This is the first release that contains the fix.
sudo apk add --upgrade libxslt
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, if immediate updating is not possible, consider isolating the application using libxslt in a secure environment to minimize exposure. Additionally, avoid processing untrusted XML data until the library is updated.
Conclusion
The vulnerability CVE-2019-18197 in libxslt poses significant risks due to potential memory corruption. It is crucial for users of affected versions to update to the patched versions to mitigate these risks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for libxslt →
FAQ
CVE-2019-18197 is a vulnerability in libxslt that can lead to memory corruption due to improper handling of pointer variables.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Exploitation of this vulnerability can lead to memory corruption, which may allow attackers to execute arbitrary code or disclose sensitive information.
Yes, the patched versions of libxslt are 1.1.33-r2 for Alpine v3.10 and v3.8, and 1.1.33-r3 for Alpine v3.11 and later versions.
If immediate updates are not feasible, consider isolating the application and avoiding processing untrusted XML data until the library is updated.
References
Related vulnerabilities
Recent vulnerabilities recorded for libxslt.