CVE-2020-25674

ImageMagick: heap-based buffer overflow in WriteOnePNGImage in coders/png.c

Published Dec 8, 2020 CVSS 3.1 · 5.5 Medium EPSS 1.0% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2523-1 imagemagick security update
Debian DLA Debian DLA DLA-3357-1 imagemagick security update
EUVD EUVD EUVD-2020-18336 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.
Ubuntu USN Ubuntu USN USN-4988-1 ImageMagick vulnerabilities
Ubuntu USN Ubuntu USN USN-5335-1 ImageMagick vulnerabilities
Ubuntu USN Ubuntu USN USN-7068-1 ImageMagick vulnerabilities
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Aug 4, 2024, 3:40 PM
Reserved
Sep 16, 2020, 12:00 AM
Status
Modified
Published
Dec 8, 2020, 10:15 PM
Modified
Jun 17, 2026, 3:07 AM
Severity
Moderate
Public date
Oct 4, 2019, 12:00 AM