CVE-2018-5785: Integer Overflow

Published Jan 19, 2018
·
Updated

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

5 affected componentsFixes available
debian/openjpeg2<=2.1.2-1.1, <=2.3.0-1
2.3.0-22.1.2-1.1+deb9u3
uclouvain openjpeg=2.3.0
Debian Debian Linux=9.0
Canonical Ubuntu Linux=18.04
debian/openjpeg2
2.4.0-32.4.0-3+deb11u32.5.0-2+deb12u32.5.3-2.1~deb13u22.5.4-1.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/openjpeg2 to a version that resolves this vulnerability.

    Fixed in 2.3.0-2Fixed in 2.1.2-1.1+deb9u3
  2. Upgrade

    Upgrade debian/openjpeg2 to 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
  3. Upgrade

    Upgrade openjpeg to a version that resolves this vulnerability.

    Fixed in 2.3.0
  4. 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

Jan 19, 2018
CVE Published
via MITRE·08:00 AM
Data Sourced
via MITRE·08:00 AM
Description
Data Sourced
via NVD·08:29 AM
DescriptionSeverityWeaknessAffected Software
Jan 23, 2018
Data Sourced
via Red Hat·07:56 PM
DescriptionSeverityAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·11:07 PM
Description
Feb 19, 2026
Data Sourced
via Ubuntu·10:02 PM
RemedyDescriptionSeverityAffected Software
Jul 13, 2026
Data Sourced
via Debian·03:05 AM
DescriptionAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2018-5785?

The severity of CVE-2018-5785 is medium with a severity value of 6.5.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203