CVE-2020-25674
mediumpriority · track · 22EPSS 0.010 · 64 %ileEURUUSEPSS · scored 2026-10-28
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (16)
Products and version ranges known to be affected.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (21)
External citations — patches, advisories, analysis.
- https://bugzilla.redhat.com/show_bug.cgi?id=1891928cnnvd
- https://github.com/ImageMagick/ImageMagick/commit/67b871032183a29d3ca0553db6ce1ae80fddb9aaPatchcnnvd
- https://lists.debian.org/debian-lts-announce/2021/01/msg00010.htmlcnnvd
- https://lists.debian.org/debian-lts-announce/2023/03/msg00008.htmlcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2020-25674cnnvd
- https://packetstormsecurity.com/files/163152/Ubuntu-Security-Notice-USN-4988-1.htmlcnnvd
- https://packetstormsecurity.com/files/166387/Ubuntu-Security-Notice-USN-5335-1.htmlcnnvd
- https://vigilance.fr/vulnerability/ImageMagick-out-of-bounds-memory-reading-via-WriteOnePNGImage-34285cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan