Critical Buffer Overflow Vulnerability in OpenJPEG Package
Summary
ALPINE-CVE-2017-14041: A stack-based buffer overflow was discovered in the pgxtoimage function in bin/jp2/convert.c in OpenJPEG 2.2.0. Affects openjpeg versions < 2.2.0-r2. Fixed in 2.2.0-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
OpenJPEG is an open-source library that implements the JPEG 2000 image coding system. It is widely used for encoding and decoding images in various applications due to its efficient compression capabilities and support for high-quality images. However, OpenJPEG versions prior to 2.2.0-r2 are vulnerable to a critical buffer overflow that can lead to severe security risks.
Vulnerability Detail
A stack-based buffer overflow was discovered in the pgxtoimage function in bin/jp2/convert.c in OpenJPEG 2.2.0. This vulnerability allows for an out-of-bounds write, which may lead to remote denial of service or potentially remote code execution. The vulnerability is classified with a CVSS score of 8.8, indicating a high severity level. Attackers could exploit this vulnerability to execute arbitrary code on affected systems, posing significant risks to data integrity and system security.
How To Fix
Minimum fixed version
2.2.0-r2
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 you are unable to update the package immediately, consider disabling any features that rely on OpenJPEG until the update can be applied. Additionally, ensure that your systems are behind firewalls and that access is restricted to trusted users only.
Conclusion
The OpenJPEG package has a critical vulnerability that can lead to severe security risks, including remote code execution. It is essential to update to the patched version (2.2.0-r2 or later) to mitigate these risks. Users should also consider using tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for openjpeg →
FAQ
The vulnerability is a stack-based buffer overflow that can lead to out-of-bounds writes, potentially allowing remote code execution.
All versions of OpenJPEG prior to 2.2.0-r2 are affected by this vulnerability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If an immediate update is not possible, consider disabling features that rely on OpenJPEG and restrict access to your systems.
Exploitation of this vulnerability could lead to remote denial of service or remote code execution, compromising system security and data integrity.
References
Related vulnerabilities
Recent vulnerabilities recorded for openjpeg.