Critical Loop Vulnerability in libjpeg-turbo: CVE-2018-11813
Summary
ALPINE-CVE-2018-11813: libjpeg 9c has a large loop because read_pixel in rdtarga.c mishandles EOF. Affects libjpeg-turbo versions < 1.5.3-r3. Fixed in 1.5.3-r3. 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
libjpeg-turbo is a widely used library for handling JPEG images, providing high-speed image processing capabilities. It is designed to be a drop-in replacement for libjpeg, offering improved performance and reduced memory usage. However, it is susceptible to vulnerabilities that can lead to severe security risks, particularly when handling malformed image files.
Vulnerability Detail
The vulnerability identified as CVE-2018-11813 arises from a large loop in the read_pixel function within the rdtarga.c file of libjpeg-turbo. This mishandling of the End Of File (EOF) condition can lead to excessive resource consumption, potentially resulting in denial of service (DoS) attacks. Attackers can exploit this flaw by crafting specific JPEG files that, when processed, can cause the application to hang or crash, thereby affecting the availability of the service.
How To Fix
Minimum fixed version
1.5.3-r3
This is the first release that contains the fix.
sudo apk add --upgrade libjpeg-turbo
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate patching is not feasible, consider implementing input validation to restrict the types of JPEG files that can be processed by your application. This can help mitigate the risk of exploitation until the library is updated.
Conclusion
The CVE-2018-11813 vulnerability in libjpeg-turbo poses a significant risk to applications that process JPEG images. It is crucial to update to the patched version to mitigate potential denial of service attacks. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for libjpeg-turbo →
FAQ
CVE-2018-11813 is a vulnerability in the libjpeg-turbo library that can lead to denial of service due to a large loop in the read_pixel function.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your manifest file for vulnerabilities.
The vulnerability can lead to denial of service attacks, causing applications to hang or crash when processing specially crafted JPEG files.
Yes, the patched version of libjpeg-turbo is 1.5.3-r3. Updating to this version will resolve the vulnerability.
Implement input validation to restrict the types of JPEG files processed by your application as a temporary workaround.
References
Related vulnerabilities
Recent vulnerabilities recorded for libjpeg-turbo.