Critical Integer Overflow Vulnerability in libxslt: Remote Code Execution Risk
Summary
ALPINE-CVE-2017-5029: The xsltAddTextString function in transform.c in libxslt 1.1.29, as used in Blink in Google Chrome prior to 57.0.2987.98 for Mac, Windows, and Linux and 57.0.2987.108 for Android, lacked a check for integer overflow duri... Affects libxslt versions < 1.1.29-r1. Fixed in 1.1.29-r1. 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 integral to many applications that require XML processing. The library is known for its performance and compliance with XSLT standards, making it a popular choice among developers. However, a critical vulnerability has been identified that could allow attackers to exploit the library, leading to severe security risks.
Vulnerability Detail
The vulnerability, identified as CVE-2017-5029, arises from the xsltAddTextString function in transform.c within libxslt version 1.1.29. This function lacks proper checks for integer overflow during size calculations, which can lead to out-of-bounds memory writes. An attacker can craft a malicious HTML page that, when processed by an application using this library, could trigger the vulnerability, potentially leading to remote code execution, data corruption, or system crashes. The CVSS score for this vulnerability is 8.8, indicating a high severity level.
How To Fix
Minimum fixed version
1.1.29-r1
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
If immediate updating is not feasible, consider implementing input validation to sanitize and restrict the types of XML documents processed by your application. This can help mitigate the risk of exploitation until the library is updated.
Conclusion
The identified vulnerability in libxslt poses a significant risk to applications that utilize this library for XML processing. It is crucial to update to the patched version to safeguard against potential exploitation. Additionally, implementing input validation can serve as a temporary measure to mitigate risks.
See every vulnerability recorded for libxslt →
FAQ
CVE-2017-5029 is a critical vulnerability in libxslt that allows for remote code execution due to an integer overflow in the xsltAddTextString function.
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 remote code execution, data corruption, and potential system crashes, posing significant risks to application security.
Yes, the patched version of libxslt is 1.1.29-r1. Updating to this version will mitigate the vulnerability.
Implement input validation to restrict the types of XML documents processed by your application as a temporary workaround until the library can be updated.
References
Related vulnerabilities
Recent vulnerabilities recorded for libxslt.