Bug 1334188 (CVE-2016-5239) - CVE-2016-5239 ImageMagick,GraphicsMagick: Gnuplot delegate vulnerability allowing command injection
Summary: CVE-2016-5239 ImageMagick,GraphicsMagick: Gnuplot delegate vulnerability allo...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-5239
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1341777 1341778 1341779 1341780
Blocks: 1333419 1334189
TreeView+ depends on / blocked
 
Reported: 2016-05-09 06:53 UTC by Adam Mariš
Modified: 2019-11-14 07:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was discovered that ImageMagick did not properly sanitize certain input before passing it to the gnuplot delegate functionality. A remote attacker could create a specially crafted image that, when processed by an application using ImageMagick or an unsuspecting user using the ImageMagick utilities, would lead to arbitrary execution of shell commands with the privileges of the user running the application.
Clone Of:
Environment:
Last Closed: 2019-06-08 02:51:20 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1237 normal SHIPPED_LIVE Important: ImageMagick security update 2016-07-18 17:06:55 UTC

Description Adam Mariš 2016-05-09 06:53:22 UTC
It was found that gnuplot delegate functionality in ImageMagick and GraphicsMagick allows system command injection while interpreting gnuplot files.

Upstream patch (ImageMagick):

http://git.imagemagick.org/repos/ImageMagick/commit/70a2cf326ed32bedee144b961005

Upstream patch (GraphicsMagick):

http://hg.code.sf.net/p/graphicsmagick/code/rev/45998a25992d

Comment 2 Adam Mariš 2016-05-23 14:08:15 UTC
Public via:

http://www.openwall.com/lists/oss-security/2016/05/09/1

Comment 4 errata-xmlrpc 2016-06-16 22:48:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2016:1237 https://access.redhat.com/errata/RHSA-2016:1237

Comment 7 Stefan Cornelius 2016-08-11 11:03:04 UTC
To clear things up a bit:

* gnuplot files should not be processed when coming from an untrusted source, as they can contain dangerous commands.
* ImageMagick does not care. If it detects a gnuplot file, it tries to delegate it to gnuplot.

If gnuplot is not installed or ImageMagick can't launch gnuplot, there should be no issue.

RHEL5 specific: The gnuplot delegation in RHEL5 is broken due to an unrelated issue. ImageMagick fails to launch gnuplot correctly, thus preventing this attack vector.


Note You need to log in before you can comment on or make changes to this bug.