CVE-2016-5239: Command Injection

Published May 9, 2016
·
Updated

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

Other sources

The gnuplot delegate functionality in ImageMagick before 6.9.4-0 and GraphicsMagick allows remote attackers to execute arbitrary commands via unspecified vectors.

— MITRE

Affected Software

3 affected componentsFixes available
ImageMagick ImageMagick<=6.9.3-9
debian/graphicsmagick
1.3.16-1.1+deb7u11.3.20-3+deb8u41.3.24-1
debian/imagemagick
8:6.7.7.10-5+deb7u58:6.8.9.9-5+deb8u28:6.9.6.2+dfsg-2

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+deb7u1Fixed in 1.3.20-3+deb8u4Fixed in 1.3.24-1
  2. Upgrade

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

    Fixed in 8:6.7.7.10-5+deb7u5Fixed in 8:6.8.9.9-5+deb8u2Fixed in 8:6.9.6.2+dfsg-2
  3. Upgrade

    Upgrade ImageMagick to a version that resolves this vulnerability.

    Fixed in 6.9.4-0

Event History

May 9, 2016
Data Sourced
06:53 AM
DescriptionSeverityAffected Software
Mar 15, 2017
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
Description
Data Sourced
07:59 PM
RemedyWeakness
Data Sourced
via NVD·07:59 PM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 14, 2019
Data Sourced
via Red Hat·07:58 AM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2016-5239?

CVE-2016-5239 is classified as a high severity vulnerability due to the potential for system command injection.

2

How do I fix CVE-2016-5239?

To fix CVE-2016-5239, update ImageMagick to version 6.9.3-10 or later where the vulnerability has been addressed.

3

What software is affected by CVE-2016-5239?

CVE-2016-5239 affects ImageMagick versions up to 6.9.3-9.

4

What types of attacks can be executed through CVE-2016-5239?

CVE-2016-5239 can be exploited to execute arbitrary commands on the host system through specially crafted gnuplot files.

5

Is CVE-2016-5239 similar to other command injection vulnerabilities?

Yes, CVE-2016-5239 is similar to other command injection vulnerabilities as it allows attackers to execute system commands under certain conditions.

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