CVE-2018-5685: Medium severity GraphicsMagick Graphicsmagick vulnerability

Published Jan 14, 2018
·
Updated

In GraphicsMagick 1.3.27, there is an infinite loop and application hang in the ReadBMPImage function (coders/bmp.c). Remote attackers could leverage this vulnerability to cause a denial of service via an image file with a crafted bit-field mask value.

Affected Software

24 affected componentsFixes available
GraphicsMagick Graphicsmagick=1.3.27
Debian Debian Linux=7.0
Debian Debian Linux=8.0
Debian Debian Linux=9.0
debian/graphicsmagick
1.3.16-1.1+deb7u171.3.20-3+deb8u41.3.30+hg15796-1~deb9u11.3.27-4
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
alpine/graphicsmagick<1.3.28-r0
1.3.28-r0
debian/graphicsmagick<1.3.27-4
1.3.27-4
debian/graphicsmagick<1.3.27-4
1.3.27-4
debian/graphicsmagick<1.3.27-4
1.3.27-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 1.3.16-1.1+deb7u17Fixed in 1.3.20-3+deb8u4Fixed in 1.3.30+hg15796-1~deb9u1Fixed in 1.3.27-4
  2. Upgrade

    Upgrade alpine/graphicsmagick to a version that resolves this vulnerability.

    Fixed in 1.3.28-r0
  3. Upgrade

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

    Fixed in 1.3.27-4
  4. Upgrade

    Upgrade GraphicsMagick to a version that resolves this vulnerability.

    Fixed in 1.3.27
  5. Compensating control

    Mitigate denial-of-service exposure by not processing untrusted or user-supplied BMP images (especially those containing crafted bit-field mask values) until the affected GraphicsMagick version is remediated.

Event History

Jan 14, 2018
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
CVE Published
via MITRE·02:00 AM
Data Sourced
via MITRE·02:00 AM
Description
Data Sourced
via OSV·02:29 AM
DescriptionSeverityAffected Software
Oct 3, 2019
Data Sourced
12:03 AM
Weakness
Data Sourced
via NVD·12:03 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
12:03 AM
Affected Software
Nov 21, 2024
Updated
via NVD·04:09 AM
RemedyAffected Software
Jun 17, 2026
Updated
via NVD·02:00 AM
Affected Software
Dec 3, 2026
Updated
via OSV·11:32 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the vulnerability ID for this GraphicsMagick vulnerability?

The vulnerability ID for this GraphicsMagick vulnerability is CVE-2018-5685.

2

What is the severity of CVE-2018-5685?

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

3

How does CVE-2018-5685 affect GraphicsMagick?

CVE-2018-5685 affects GraphicsMagick by causing an infinite loop and application hang in the ReadBMPImage function.

4

How can remote attackers exploit CVE-2018-5685?

Remote attackers can exploit CVE-2018-5685 by leveraging the vulnerability to cause a denial of service via an image file with a crafted bit-field mask value.

5

How can I fix the CVE-2018-5685 vulnerability?

To fix the CVE-2018-5685 vulnerability, update GraphicsMagick to version 1.4+really1.3.35-1 (or later) for Debian-based systems, or version 1.3.18-1ubuntu3.1 (or later) for Ubuntu-based systems.

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