Ubuntu 16.04 ESM / 18.04 ESM / 20.04 LTS : GraphicsMagick vulnerabilities (USN-5974-1)

critical Nessus Plugin ID 173434


The remote Ubuntu host is missing one or more security updates.


The remote Ubuntu 16.04 ESM / 18.04 ESM / 20.04 LTS host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-5974-1 advisory.

- In GraphicsMagick 1.4 snapshot-20181209 Q8, there is a heap-based buffer overflow in the WriteTGAImage function of tga.c, which allows attackers to cause a denial of service via a crafted image file, because the number of rows or columns can exceed the pixel-dimension restrictions of the TGA specification.

- In GraphicsMagick 1.3.31, the ReadDIBImage function of coders/dib.c has a vulnerability allowing a crash and denial of service via a dib file that is crafted to appear with direct pixel values and also colormapping (which is not available beyond 8-bits/sample), and therefore lacks indexes initialization.

- 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. (CVE-2018-5685)

- In GraphicsMagick 1.3.28, there is a divide-by-zero in the ReadMNGImage function of coders/png.c. Remote attackers could leverage this vulnerability to cause a crash and denial of service via a crafted mng file.

- In GraphicsMagick 1.4 snapshot-20190322 Q8, there is a heap-based buffer over-read in the function ReadMIFFImage of coders/miff.c, which allows attackers to cause a denial of service or information disclosure via an RLE packet. (CVE-2019-11006)

- GraphicsMagick through 1.3.35 has a heap-based buffer overflow in ReadMNGImage in coders/png.c.

- In GraphicsMagick, a heap buffer overflow was found when parsing MIFF. (CVE-2022-1270)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.


Update the affected packages.

See Also


Plugin Details

Severity: Critical

ID: 173434

File Name: ubuntu_USN-5974-1.nasl

Version: 1.2

Type: local

Agent: unix

Published: 3/27/2023

Updated: 10/20/2023

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Azure, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information


Risk Factor: Medium

Score: 6.7


Risk Factor: Medium

Base Score: 6.4

Temporal Score: 5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:P

CVSS Score Source: CVE-2019-11006


Risk Factor: Critical

Base Score: 9.1

Temporal Score: 8.2

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:16.04:-:esm, cpe:/o:canonical:ubuntu_linux:18.04:-:esm, cpe:/o:canonical:ubuntu_linux:20.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:graphicsmagick, p-cpe:/a:canonical:ubuntu_linux:graphicsmagick-imagemagick-compat, p-cpe:/a:canonical:ubuntu_linux:graphicsmagick-libmagick-dev-compat, p-cpe:/a:canonical:ubuntu_linux:libgraphics-magick-perl, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick%2b%2b-q16-12, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick%2b%2b1-dev, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick%2b%2b3, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick-q16-3, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick1-dev, p-cpe:/a:canonical:ubuntu_linux:libgraphicsmagick3

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 3/27/2023

Vulnerability Publication Date: 1/14/2018

Reference Information

CVE: CVE-2018-20184, CVE-2018-20189, CVE-2018-5685, CVE-2018-9018, CVE-2019-11006, CVE-2020-12672, CVE-2022-1270

USN: 5974-1