Out-of-bounds read in ImageMagick - CVE-2019-19949

 

Out-of-bounds read in ImageMagick - CVE-2019-19949

Published: January 7, 2020


Vulnerability identifier: #VU24030
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-19949
CWE-ID: CWE-125
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due missing length check prior pointer dereference in the "WritePNGImage" function of coders/png.c, related to Magick_png_write_raw_profile and LocaleNCompare. A remote attacker can cause a denial of service condition on the target system.


Affected software

ImageMagick
Amazon Linux AMI
Debian Linux
Ubuntu
Opensuse
imagemagick6 (Alpine package)
imagemagick (Alpine package)
libmagickcore5-extra (Ubuntu package)
libmagickwand-dev (Ubuntu package)
libmagickcore5 (Ubuntu package)
libmagickwand5 (Ubuntu package)
libmagick++-dev (Ubuntu package)
libmagickcore-dev (Ubuntu package)
perlmagick (Ubuntu package)
imagemagick (Ubuntu package)
libmagick++5 (Ubuntu package)
imagemagick-6.q16 (Ubuntu package)
libmagick++-6.q16-8 (Ubuntu package)
libmagickcore-6.q16-6 (Ubuntu package)
php70-pecl-imagick
php71-pecl-imagick
php72-pecl-imagick
php54-pecl-imagick
php55-pecl-imagick
php56-pecl-imagick
ImageMagick
libmagickwand-6.q16-2 (Ubuntu package)
libmagickcore-6.q16-2-extra (Ubuntu package)
libmagickcore-6.q16-2 (Ubuntu package)
libmagick++-6.q16-5v5 (Ubuntu package)
libmagickwand-6.q16-3 (Ubuntu package)
libmagickcore-6.q16hdri-3-extra (Ubuntu package)
libmagickcore-6.q16hdri-3 (Ubuntu package)
libmagickcore-6.q16-3-extra (Ubuntu package)
libmagickcore-6.q16-3 (Ubuntu package)
libmagick++-6.q16-7 (Ubuntu package)
libmagick++-6.q16hdri-7 (Ubuntu package)
libmagickwand-6.q16hdri-3 (Ubuntu package)
imagemagick-6.q16hdri (Ubuntu package)
libmagickwand-6.q16hdri-6 (Ubuntu package)
libmagickwand-6.q16-6 (Ubuntu package)
libmagickcore-6.q16hdri-6-extra (Ubuntu package)
libmagickcore-6.q16hdri-6 (Ubuntu package)
libmagickcore-6.q16-6-extra (Ubuntu package)
libmagick++-6.q16hdri-8 (Ubuntu package)
imagemagick (Debian package)

How to mitigate CVE-2019-19949

Install update from vendor's website.

ImageMagick - update to 7.0.8-44
libmagickcore5-extra (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
libmagickwand-dev (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
libmagickcore5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
libmagickwand5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
libmagick++-dev (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
libmagickcore-dev (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
perlmagick (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
imagemagick (Ubuntu package) - addressed in versions 8:6.7.7.10-6ubuntu3.13+esm10, 8:6.8.9.9-7ubuntu5.16, 8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.10.23+dfsg-2.1ubuntu11.1, 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagick++5 (Ubuntu package) - update to 8:6.7.7.10-6ubuntu3.13+esm10
imagemagick-6.q16 (Ubuntu package) - addressed in versions 8:6.8.9.9-7ubuntu5.16, 8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.10.23+dfsg-2.1ubuntu11.1, 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagick++-6.q16-8 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.1, 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickcore-6.q16-6 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.1, 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
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
libmagickwand-6.q16-2 (Ubuntu package) - update to 8:6.8.9.9-7ubuntu5.16
libmagickcore-6.q16-2-extra (Ubuntu package) - update to 8:6.8.9.9-7ubuntu5.16
libmagickcore-6.q16-2 (Ubuntu package) - update to 8:6.8.9.9-7ubuntu5.16
libmagick++-6.q16-5v5 (Ubuntu package) - update to 8:6.8.9.9-7ubuntu5.16
libmagickwand-6.q16-3 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagickcore-6.q16hdri-3-extra (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagickcore-6.q16hdri-3 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagickcore-6.q16-3-extra (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagickcore-6.q16-3 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagick++-6.q16-7 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagick++-6.q16hdri-7 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
libmagickwand-6.q16hdri-3 (Ubuntu package) - update to 8:6.9.7.4+dfsg-16ubuntu6.9
imagemagick-6.q16hdri (Ubuntu package) - addressed in versions 8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickwand-6.q16hdri-6 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickwand-6.q16-6 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickcore-6.q16hdri-6-extra (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickcore-6.q16hdri-6 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagickcore-6.q16-6-extra (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
libmagick++-6.q16hdri-8 (Ubuntu package) - addressed in versions 8:6.9.10.23+dfsg-2.1ubuntu11.2, 8:6.9.10.23+dfsg-2.1ubuntu13.1
imagemagick (Debian package) - update to 8:6.9.10.23+dfsg-2.1+deb10u1

External References

Related Security Bulletins