Out-of-bounds write in ImageMagick - CVE-2018-12599

 

Out-of-bounds write in ImageMagick - CVE-2018-12599

Published: July 16, 2018 / Updated: July 16, 2018


Vulnerability identifier: #VU13872
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-12599
CWE-ID: CWE-787
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists in ReadBMPImage and WriteBMPImage in coders/bmp.c due to out-of-bounds write. A remote unauthenticated attacker can trick the victim into opening a specially crafted file and execute arbitrary code with elevated privileges.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

ImageMagick
Debian Linux
Amazon Linux AMI
imagemagick6 (Alpine package)
openSUSE Leap
php70-pecl-imagick
php71-pecl-imagick
php72-pecl-imagick
php54-pecl-imagick
php55-pecl-imagick
php56-pecl-imagick
ImageMagick

How to mitigate CVE-2018-12599

Install update from vendor's website.

imagemagick6 (Alpine package) - update to 6.9.10.37-r0
php70-pecl-imagick - update to 3.4.4-1.7
php71-pecl-imagick - update to 3.4.4-2.8
php72-pecl-imagick - update to 3.4.4-2.10
php54-pecl-imagick - update to 3.4.4-2.11
php55-pecl-imagick - update to 3.4.4-2.15
php56-pecl-imagick - update to 3.4.4-2.16
ImageMagick - update to 6.9.10.68-3.22

External References

Related Security Bulletins