Integer overflow in ImageMagick - CVE-2020-25676

 

Integer overflow in ImageMagick - CVE-2020-25676

Published: March 21, 2022


Vulnerability identifier: #VU61507
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-2020-25676
CWE-ID: CWE-190
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 integer overflow within the CatromWeights(), MeshInterpolate(), InterpolatePixelChannel(), InterpolatePixelChannels(), and InterpolatePixelInfo() function inMagickCore/pixel.c. A remote attacker can pass specially crafted image to the application, trigger integer overflow and execute arbitrary code on the target system.

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


Affected software

ImageMagick
Ubuntu
libimage-magick-perl (Ubuntu package)
imagemagick-common (Ubuntu package)
libmagickcore-6.q16-dev (Ubuntu package)
libmagickcore-dev (Ubuntu package)
imagemagick (Ubuntu package)
libimage-magick-q16-perl (Ubuntu package)
libmagickcore-6.q16-2-extra (Ubuntu package)
imagemagick-6.q16 (Ubuntu package)
libmagickcore-6-headers (Ubuntu package)
libmagick++-6.q16-5v5 (Ubuntu package)
perlmagick (Ubuntu package)
libmagickcore-6-arch-config (Ubuntu package)
libmagick++-6.q16-dev (Ubuntu package)
libmagickwand-6.q16-dev (Ubuntu package)
libmagickcore-6.q16-2 (Ubuntu package)
libmagickwand-6.q16-2 (Ubuntu package)

How to mitigate CVE-2020-25676

Install updates from vendor's website.

ImageMagick - update to 7.0.9-0
libimage-magick-perl (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
imagemagick-common (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-6.q16-dev (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-dev (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
imagemagick (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libimage-magick-q16-perl (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-6.q16-2-extra (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
imagemagick-6.q16 (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-6-headers (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagick++-6.q16-5v5 (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
perlmagick (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-6-arch-config (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagick++-6.q16-dev (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickwand-6.q16-dev (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickcore-6.q16-2 (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2
libmagickwand-6.q16-2 (Ubuntu package) - update to 8:6.8.9.97ubuntu5.16+esm2

External References

Related Security Bulletins