Every CVE Search/ Get API key

CVE-2016-5240

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG...

5.5 MediumFix available

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.18%Up 0.4 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 5.5

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
CVE-2016-5240
CVSS 3.0
5.5 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:N/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
CVE-2016-5240
Updated
2026-11-02
EUVDEUVD-2016-6191 No score

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
EUVD-2016-6191
Updated
2026-11-03
GitHub AdvisoriesGHSA-96q6-wwhr-92h9 5.5

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG...

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
GHSA-96q6-wwhr-92h9
CVSS 3.0
5.5 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-20
Updated
2026-11-02
OSV 5.5

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
CVE-2016-5240
CVSS 3.0
5.5 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2016-5240 5.5

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
DEBIAN-CVE-2016-5240
CVSS 3.0
5.5 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2016-5240 5.5

The DrawDashPolygon function in magick/render.c in GraphicsMagick before 1.3.24 and the SVG renderer in ImageMagick allow remote attackers to cause a denial of service (infinite loop) by converting a circularly defined SVG file.

Record
UBUNTU-CVE-2016-5240
CVSS 3.0
5.5 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVMGASA-2016-0252 No score

Updated graphicsmagick packages fix security vulnerability

  • A read out-of-bound in the parsing of gif files using GraphicsMagick (CVE-2015-8808).

  • Infinite loop caused by converting a circularly defined svg file (CVE-2016-5240).

  • Fix another case of CVE-2016-2317 (heap buffer overflow) in the MVG rendering code (also impacts SVG).

  • arithmetic exception converting a svg file (CVE-2016-5241)

  • Arithmetic exception converting a svg file caused by a X%0 operation in magick/render.c (CVE-2016-2318)

  • A shell exploit (CVE-2016-5118) was discovered associated with a filename syntax where file names starting with '|' are intepreted as shell commands executed via popen(). Insufficient sanitization in the SVG and MVG renderers allows such filenames to be passed through from potentially untrusted files. There might be other ways for untrusted inputs to produce such filenames. Due to this issue, support for the feature is removed entirely.

The gnudl, octave, pdf2djvu, and photoqt packages have been rebuilt to use the updated GraphicsMagick++ library.

Record
MGASA-2016-0252
Updated
2026-11-02
OSVSUSE-SU-2016:1783-1 No score

Security update for GraphicsMagick

GraphicsMagick was updated to fix 37 security issues.

These security issues were fixed:

  • CVE-2014-9810: SEGV in dpx file handler (bsc#983803).
  • CVE-2014-9811: Crash in xwd file handler (bsc#984032).
  • CVE-2014-9813: Crash on corrupted viff file (bsc#984035).
  • CVE-2014-9814: NULL pointer dereference in wpg file handling (bsc#984193).
  • CVE-2014-9815: Crash on corrupted wpg file (bsc#984372).
  • CVE-2014-9816: Out of bound access in viff image (bsc#984398).
  • CVE-2014-9817: Heap buffer overflow in pdb file handling (bsc#984400).
  • CVE-2014-9818: Out of bound access on malformed sun file (bsc#984181).
  • CVE-2014-9819: Heap overflow in palm files (bsc#984142).
  • CVE-2014-9830: Handling of corrupted sun file (bsc#984135).
  • CVE-2014-9831: Handling of corrupted wpg file (bsc#984375).
  • CVE-2014-9837: Additional PNM sanity checks (bsc#984166).
  • CVE-2014-9834: Heap overflow in pict file (bsc#984436).
  • CVE-2014-9853: Memory leak in rle file handling (bsc#984408).
  • CVE-2015-8903: Denial of service (cpu) in vicar (bsc#983259).
  • CVE-2015-8901: MIFF file DoS (endless loop) (bsc#983234).
  • CVE-2016-5688: Various invalid memory reads in ImageMagick WPG (bsc#985442).
  • CVE-2015-8894: Double free in coders/tga.c:221 (bsc#983523).
  • CVE-2015-8896: Double free / integer truncation issue in coders/pict.c:2000 (bsc#983533).
  • CVE-2014-9807: Double free in pdb coder. (bsc#983794).
  • CVE-2014-9828: Corrupted (too many colors) psd file (bsc#984028).
  • CVE-2014-9805: SEGV due to a corrupted pnm file (bsc#983752).
  • CVE-2014-9808: SEGV due to corrupted dpc images (bsc#983796).
  • CVE-2014-9820: Heap overflow in xpm files (bsc#984150).
  • CVE-2014-9839: Theoretical out of bound access in magick/colormap-private.h (bsc#984379).
  • CVE-2014-9809: SEGV due to corrupted xwd images. (bsc#983799).
  • CVE-2016-5240: SVG converting issue resulting in DoS (endless loop) (bsc#983309).
  • CVE-2014-9840: Out of bound access in palm file (bsc#984433).
  • CVE-2014-9847: Incorrect handling of 'previous' image in the JNG decoder (bsc#984144).
  • CVE-2016-5241: Arithmetic exception (div by 0) in SVG conversion (bsc#983455).
  • CVE-2014-9845: Crash due to corrupted dib file (bsc#984394).
  • CVE-2014-9844: Out of bound issue in rle file (bsc#984373).
  • CVE-2014-9835: Heap overflow in wpf file (bsc#984145).
  • CVE-2014-9829: Out of bound access in sun file (bsc#984409).
  • CVE-2014-9846: Added checks to prevent overflow in rle file. (bsc#983521).
  • CVE-2016-2317: Multiple vulnerabilities when parsing and processing SVG files (bsc#965853).
  • CVE-2016-2318: Multiple vulnerabilities when parsing and processing SVG files (bsc#965853).
Record
SUSE-SU-2016:1783-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
graphicsmagick
Debian:12
before 1.3.24-1
1.3.24-1
graphicsmagick
Debian:13
before 1.3.24-1
1.3.24-1
graphicsmagick
Debian:14
before 1.3.24-1
1.3.24-1
graphicsmagick
Debian:7
From an advisory covering 2 CVEs
before 1.3.16-1.1+deb7u3, plus listed versions
1.3.16-1.11.3.16-1.1+deb7u11.3.16-1.1+deb7u2
1.3.16-1.1+deb7u3
graphicsmagick
Debian:8
From an advisory covering 14 CVEs
before 1.3.20-3+deb8u2, plus listed versions
1.3.20-3+deb8u1
1.3.20-3+deb8u2
graphicsmagick
Mageia:5
From an advisory covering 6 CVEs
before 1.3.24-1.2.mga5
1.3.24-1.2.mga5
gnudl
Mageia:5
From an advisory covering 6 CVEs
before 0.9.5-2.1.mga5
0.9.5-2.1.mga5
octave
Mageia:5
From an advisory covering 6 CVEs
before 3.8.2-3.1.mga5
3.8.2-3.1.mga5
pdf2djvu
Mageia:5
From an advisory covering 6 CVEs
before 0.7.17-4.1.mga5
0.7.17-4.1.mga5
photoqt
Mageia:5
From an advisory covering 6 CVEs
before 1.0-4.1.mga5
1.0-4.1.mga5
Show 60 moreShow less
Affected packages
PackageAffectedFixed
ImageMagick
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-debuginfo
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++-devel
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-devel
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-doc
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-perl
Red Hat:enterprise_linux:6::client
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++-devel
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-debuginfo
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-devel
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-doc
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-perl
Red Hat:enterprise_linux:6::computenode
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-debuginfo
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++-devel
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-devel
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-doc
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-perl
Red Hat:enterprise_linux:6::server
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-debuginfo
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-c++-devel
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-devel
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-doc
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick-perl
Red Hat:enterprise_linux:6::workstation
From an advisory covering 7 CVEs
before 0:6.7.2.7-5.el6_8
0:6.7.2.7-5.el6_8
ImageMagick
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-debuginfo
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++-devel
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-devel
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-doc
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-perl
Red Hat:enterprise_linux:7::client
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++-devel
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-debuginfo
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-devel
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-doc
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-perl
Red Hat:enterprise_linux:7::computenode
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-debuginfo
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-perl
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++-devel
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-devel
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-doc
Red Hat:enterprise_linux:7::server
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-debuginfo
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-perl
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-c++-devel
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-devel
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
ImageMagick-doc
Red Hat:enterprise_linux:7::workstation
From an advisory covering 7 CVEs
before 0:6.7.8.9-15.el7_2
0:6.7.8.9-15.el7_2
GraphicsMagick
SUSE:Linux Enterprise Software Development Kit 11 SP4
From an advisory covering 37 CVEs
before 1.2.5-4.41.1
1.2.5-4.41.1
GraphicsMagick
SUSE:Studio Onsite 1.3
From an advisory covering 37 CVEs
before 1.2.5-4.41.1
1.2.5-4.41.1
graphicsmagick
Ubuntu:14.04:LTS
before 1.3.18-1ubuntu3.1, plus listed versions
1.3.16-1.1ubuntu21.3.16-1.1ubuntu31.3.18-1ubuntu3
1.3.18-1ubuntu3.1
graphicsmagick
Ubuntu:16.04:LTS
before 1.3.23-1ubuntu0.1, plus listed versions
1.3.21-31.3.23-11.3.23-1build1
1.3.23-1ubuntu0.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2016-5240 is a medium vulnerability (CVSS 5.5) in Graphicsmagick, published July 11, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.18%, the 82nd percentile. Fixed in graphicsmagick 1.3.24-1.

References

Show 120 moreShow less
MoveEnter Open