Buffer overflow in ImageMagick - CVE-2018-16645

 

Buffer overflow in ImageMagick - CVE-2018-16645

Published: October 14, 2018


Vulnerability identifier: #VU15353
CSH Severity: Low
CVSS v4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-16645
CWE-ID: CWE-119
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 due to a boundary error in ReadBMPImage() function in coders/bmp.c and in ReadDIBImage() function in coders/dib.c. A remote attacker can create a specially crafted image, pass it to the affected application and trigger application crash due to memory allocation error.


Affected software

ImageMagick
Ubuntu
SUSE Linux
Opensuse
imagemagick6 (Alpine package)
imagemagick (Ubuntu package)
libmagickcore5-extra (Ubuntu package)
libmagickcore5 (Ubuntu package)
libmagick++5 (Ubuntu package)
libmagick++-6.q16-5v5 (Ubuntu package)
libmagickcore-6.q16-2-extra (Ubuntu package)
imagemagick-6.q16 (Ubuntu package)
libmagickcore-6.q16-2 (Ubuntu package)
imagemagick (Debian package)
libmagickcore-6.q16-3-extra (Ubuntu package)
libmagick++-6.q16-7 (Ubuntu package)
libmagickcore-6.q16-3 (Ubuntu package)
libmagick++-6.q16-8 (Ubuntu package)
libmagickcore-6.q16-6-extra (Ubuntu package)
libmagickcore-6.q16-6 (Ubuntu package)

How to mitigate CVE-2018-16645

Install updates from vendor's website.

ImageMagick - update to 7.0.8-12
imagemagick6 (Alpine package) - update to 6.9.10.37-r0
imagemagick (Ubuntu package) - addressed in versions 8:6.7.7.10-6ubuntu3.13, 8:6.8.9.9-7ubuntu5.13, 8:6.8.9.9-7ubuntu5.14, 8:6.9.7.4+dfsg-16ubuntu6.4, 8:6.9.7.4+dfsg-16ubuntu6.7, 8:6.9.10.8+dfsg-1ubuntu2.2, 8:6.9.10.14+dfsg-7ubuntu2.2
libmagickcore5-extra (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13
libmagickcore5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13
libmagick++5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13
libmagick++-6.q16-5v5 (Ubuntu package) - addressed in versions 8:6.8.9.9-7ubuntu5.13, 8:6.8.9.9-7ubuntu5.14
libmagickcore-6.q16-2-extra (Ubuntu package) - addressed in versions 8:6.8.9.9-7ubuntu5.13, 8:6.8.9.9-7ubuntu5.14
imagemagick-6.q16 (Ubuntu package) - addressed in versions 8:6.8.9.9-7ubuntu5.13, 8:6.8.9.9-7ubuntu5.14, 8:6.9.7.4+dfsg-16ubuntu6.4, 8:6.9.7.4+dfsg-16ubuntu6.7, 8:6.9.10.8+dfsg-1ubuntu2.2, 8:6.9.10.14+dfsg-7ubuntu2.2
libmagickcore-6.q16-2 (Ubuntu package) - addressed in versions 8:6.8.9.9-7ubuntu5.13, 8:6.8.9.9-7ubuntu5.14
imagemagick (Debian package) - update to 8:6.9.7.4+dfsg-11+deb9u6
libmagickcore-6.q16-3-extra (Ubuntu package) - addressed in versions 8:6.9.7.4+dfsg-16ubuntu6.4, 8:6.9.7.4+dfsg-16ubuntu6.7
libmagick++-6.q16-7 (Ubuntu package) - addressed in versions 8:6.9.7.4+dfsg-16ubuntu6.4, 8:6.9.7.4+dfsg-16ubuntu6.7
libmagickcore-6.q16-3 (Ubuntu package) - addressed in versions 8:6.9.7.4+dfsg-16ubuntu6.4, 8:6.9.7.4+dfsg-16ubuntu6.7
libmagick++-6.q16-8 (Ubuntu package) - addressed in versions 8:6.9.10.8+dfsg-1ubuntu2.2, 8:6.9.10.14+dfsg-7ubuntu2.2
libmagickcore-6.q16-6-extra (Ubuntu package) - addressed in versions 8:6.9.10.8+dfsg-1ubuntu2.2, 8:6.9.10.14+dfsg-7ubuntu2.2
libmagickcore-6.q16-6 (Ubuntu package) - addressed in versions 8:6.9.10.8+dfsg-1ubuntu2.2, 8:6.9.10.14+dfsg-7ubuntu2.2

External References

Related Security Bulletins