CVE-2020-25674

Name
CVE-2020-25674
Description
WriteOnePNGImage() from coders/png.c (the PNG coder) has a for loop with an improper exit condition that can allow an out-of-bounds READ via heap-buffer-overflow. This occurs because it is possible for the colormap to have less than 256 valid values but the loop condition will loop 256 times, attempting to pass invalid colormap data to the event logger. The patch replaces the hardcoded 256 value with a call to MagickMin() to ensure the proper value is used. This could impact application availability when a specially crafted input file is processed by ImageMagick. This flaw affects ImageMagick versions prior to 7.0.8-68.
NVD Severity
medium
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
Exploit https://bugzilla.redhat.com/show_bug.cgi?id=1891928
Mailing List https://lists.debian.org/debian-lts-announce/2021/01/msg00010.html

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* imagemagick >= None < 7.0.8-68
cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* imagemagick >= None < 6.9.10-68
cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* imagemagick >= 7.0.0-0 < 7.0.8-68

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
imagemagick 3.10-main 7.0.8.68-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable