Skip to content
Heist/ feed
Back to feed
MediumFix available

imagemagick — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2020-25674

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.

Products
imagemagick
Affected versions
Not specified
Fixed versions
8:6.9.11.24+dfsg-1
CVEs
CVE-2020-25674
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 12:50 UTC · Revision 1

Source evidence

DEBIAN-CVE-2020-25674

core-osv · Original source

Published 8 Dec 2020, 22:15 UTC

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.

osv:DEBIAN-CVE-2020-25674

imagemagick

Fixed versions: 8:6.9.11.24+dfsg-1

imagemagick

Fixed versions: 8:6.9.11.24+dfsg-1

imagemagick

Fixed versions: 8:6.9.11.24+dfsg-1

Complete source record
{
  "id": "d64e5b87d20157578278852a5bb0b6ee22e817012581e9671a09b255ceb5ac9a",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2020-25674",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2020-25674",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2020-25674",
    "products": [
      {
        "name": {
          "value": "imagemagick",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8:6.9.11.24+dfsg-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "imagemagick",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8:6.9.11.24+dfsg-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "imagemagick",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8:6.9.11.24+dfsg-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2020-25674",
      "aliases": [
        "DEBIAN-CVE-2020-25674"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8:6.9.11.24+dfsg-1"
                }
              ]
            }
          ],
          "package": {
            "name": "imagemagick",
            "purl": "pkg:deb/debian/imagemagick?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-25674.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8:6.9.11.24+dfsg-1"
                }
              ]
            }
          ],
          "package": {
            "name": "imagemagick",
            "purl": "pkg:deb/debian/imagemagick?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-25674.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8:6.9.11.24+dfsg-1"
                }
              ]
            }
          ],
          "package": {
            "name": "imagemagick",
            "purl": "pkg:deb/debian/imagemagick?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-25674.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-26T12:01:03.848743172Z",
      "provider": "osv",
      "upstream": [
        "CVE-2020-25674"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2020-25674"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2020-25674",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 451444,
  "published_at": "2020-12-08T22:15:17.32+00:00"
}