Integer Overflow Vulnerability in OpenJPEG Package Leading to Denial of Service
Summary
ALPINE-CVE-2018-5785: In OpenJPEG 2.3.0, there is an integer overflow caused by an out-of-bounds left shift in the opj_j2k_setup_encoder function (openjp2/j2k.c). Affects openjpeg versions < 2.3.0-r3. Fixed in 2.3.0-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
OpenJPEG is an open-source JPEG 2000 codec that provides a comprehensive set of features for encoding and decoding JPEG 2000 images. It is widely used in various applications due to its efficiency and support for advanced image processing. However, versions of OpenJPEG prior to 2.3.0-r3 are susceptible to a critical vulnerability that can be exploited by attackers.
Vulnerability Detail
In OpenJPEG version 2.3.0, an integer overflow occurs due to an out-of-bounds left shift in the opj_j2k_setup_encoder function located in openjp2/j2k.c. This vulnerability can be exploited by remote attackers using a specially crafted BMP file, potentially leading to a denial of service. The vulnerability has a CVSS score of 6.5, indicating a moderate risk level, and it allows attackers to disrupt service without requiring authentication.
How To Fix
Minimum fixed version
2.3.0-r3
This is the first release that contains the fix.
sudo apk add --upgrade openjpeg
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 restricting access to the application that utilizes OpenJPEG to trusted users only, thereby minimizing the risk of exploitation until the package can be updated.
Conclusion
The OpenJPEG package has a critical vulnerability that can be exploited to cause a denial of service. Users are strongly advised to update to the patched version 2.3.0-r3 or later to mitigate the risk. For those unable to update immediately, restricting access to the application can serve as a temporary workaround.
See every vulnerability recorded for openjpeg →
FAQ
The vulnerability is an integer overflow that can lead to a denial of service when processing specially crafted BMP files.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score of this vulnerability is 6.5, indicating a moderate risk level.
Exploitation of this vulnerability can lead to a denial of service, disrupting the functionality of applications that rely on OpenJPEG.
Yes, you can restrict access to the application that uses OpenJPEG to trusted users only until you can apply the necessary updates.
References
Related vulnerabilities
Recent vulnerabilities recorded for openjpeg.