Improper access control in ImageMagick - CVE-2016-5118

 

Improper access control in ImageMagick - CVE-2016-5118

Published: June 10, 2016 / Updated: July 28, 2020


Vulnerability identifier: #VU32204
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2016-5118
CWE-ID: CWE-284
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbitrary code via a | (pipe) character at the start of a filename.


Affected software

ImageMagick
SUSE Linux
Ubuntu
Slackware Linux
Opensuse
imagemagick (Alpine package)
imagemagick (Ubuntu package)
imagemagick-common (Ubuntu package)
libmagickcore4 (Ubuntu package)
libmagick++4 (Ubuntu package)
libmagickcore5 (Ubuntu package)
libmagick++5 (Ubuntu package)
libmagickcore-6.q16-2 (Ubuntu package)
imagemagick-6.q16 (Ubuntu package)
libmagick++-6.q16-5v5 (Ubuntu package)

How to mitigate CVE-2016-5118

Install update from vendor's website.

imagemagick (Alpine package) - update to 6.9.6.8-r0
imagemagick (Ubuntu package) - addressed in versions 8:6.6.9.7-5ubuntu3.4, 8:6.7.7.10-6ubuntu3.1, 8:6.8.9.9-5ubuntu2.1, 8:6.8.9.9-7ubuntu5.1
imagemagick-common (Ubuntu package) - addressed in versions 8:6.6.9.7-5ubuntu3.4, 8:6.7.7.10-6ubuntu3.1, 8:6.8.9.9-5ubuntu2.1, 8:6.8.9.9-7ubuntu5.1
libmagickcore4 (Ubuntu package) - update to 8:6.6.9.7-5ubuntu3.4
libmagick++4 (Ubuntu package) - update to 8:6.6.9.7-5ubuntu3.4
libmagickcore5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.1
libmagick++5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.1
libmagickcore-6.q16-2 (Ubuntu package) - addressed in versions 8:6.8.9.9-5ubuntu2.1, 8:6.8.9.9-7ubuntu5.1
imagemagick-6.q16 (Ubuntu package) - addressed in versions 8:6.8.9.9-5ubuntu2.1, 8:6.8.9.9-7ubuntu5.1
libmagick++-6.q16-5v5 (Ubuntu package) - addressed in versions 8:6.8.9.9-5ubuntu2.1, 8:6.8.9.9-7ubuntu5.1

External References

Related Security Bulletins