CVE-2018-5785: Integer Overflow
A flaw was found in OpenJPEG 2.3.0, there is an integer overflow caused by an out-of-bounds left shift in the opjj2ksetupencoder function (openjp2/j2k.c). Remote attackers could leverage this vulnerability to cause a denial of service via a crafted bmp file.
Reference: https://github.com/uclouvain/openjpeg/issues/1057
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/openjpeg2to a version that resolves this vulnerability.Fixed in 2.3.0-2Fixed in 2.1.2-1.1+deb9u3 - Upgrade
Upgrade
debian/openjpeg2to a version that resolves this vulnerability.Fixed in 2.4.0-3Fixed in 2.4.0-3+deb11u3Fixed in 2.5.0-2+deb12u3Fixed in 2.5.3-2.1~deb13u2Fixed in 2.5.4-1.1 - Upgrade
Upgrade
openjpegto a version that resolves this vulnerability.Fixed in 2.3.0 - Compensating control
Mitigate denial of service risk by preventing untrusted clients from providing crafted BMP files that could trigger the OpenJPEG integer overflow (e.g., restrict/validate upload types and block/inspect BMP inputs before they reach OpenJPEG).
Event History
Frequently Asked Questions
What is the severity of CVE-2018-5785?
The severity of CVE-2018-5785 is medium with a severity value of 6.5.
What is the affected software of CVE-2018-5785?
The affected software of CVE-2018-5785 includes OpenJPEG 2.3.0 and OpenJPEG 2.3.0-2.
How can remote attackers exploit CVE-2018-5785?
Remote attackers can exploit CVE-2018-5785 by leveraging the integer overflow vulnerability in the opj_j2k_setup_encoder function to cause a denial of service using a crafted bmp file.
Is there a fix available for CVE-2018-5785?
Yes, a fix is available for CVE-2018-5785. It is recommended to update to OpenJPEG version 2.3.1 or higher.
What is the Common Weakness Enumeration (CWE) of CVE-2018-5785?
The Common Weakness Enumeration (CWE) of CVE-2018-5785 is CWE-190, which is the integer overflow vulnerability.