Refine your search

1 vulnerability found for graphicsmagick by Debian

CVE-2026-77118 (GCVE-0-2026-77118)
Vulnerability from cvelistv5
Published
2026-08-20 12:42
Modified
2026-08-26 19:51
CWE
Summary
A heap out-of-bounds write exists in the Photo CD (PCD) decoder of GraphicsMagick. In DecodeImage() (coders/pcd.c), the Huffman delta loop advances its output pointer with q++ after every decoded delta and never checks it against the end of the heap-allocated luma/chroma plane buffers. The pointer is repositioned only when a sync marker introduces a new plane/row; between sync markers the run length is bounded solely by the input. A crafted PCD file that positions the pointer near the end of a plane and then supplies a long run of deltas with no intervening sync therefore walks the pointer past the end of the allocation and writes through it. Processing an untrusted PCD file — for example with gm convert or gm identify, or through any application linked against libGraphicsMagick — can corrupt heap memory beyond the buffers.
Impacted products
Vendor Product Version
GraphicsMagick Group GraphicsMagick Version: 1.0.0   
    cpe:2.3:a:graphicsmagick:graphicsmagick:*:*:*:*:*:*:*:*
Create a notification for this product.
   Debian graphicsmagick Version: 0
    cpe:2.3:o:debian:debian_linux:11:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:12:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:13:*:*:*:*:*:*:*
Create a notification for this product.
   Fedora Project GraphicsMagick Version: 0   < 1.3.48
    cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:*
    cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:*
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-77118",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-08-26T19:42:13.414822Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-08-26T19:51:24.566Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "cpes": [
            "cpe:2.3:a:graphicsmagick:graphicsmagick:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "PCD / PCDS image coder"
          ],
          "platforms": [
            "Linux",
            "Windows",
            "macOS"
          ],
          "product": "GraphicsMagick",
          "programFiles": [
            "coders/pcd.c"
          ],
          "programRoutines": [
            {
              "name": "DecodeImage"
            }
          ],
          "repo": "https://foss.heptapod.net/graphicsmagick/graphicsmagick",
          "vendor": "GraphicsMagick Group",
          "versions": [
            {
              "lessThan": "1.3.48",
              "status": "affected",
              "version": "1.0.0",
              "versionType": "semver"
            }
          ]
        },
        {
          "collectionURL": "https://packages.debian.org",
          "cpes": [
            "cpe:2.3:o:debian:debian_linux:11:*:*:*:*:*:*:*",
            "cpe:2.3:o:debian:debian_linux:12:*:*:*:*:*:*:*",
            "cpe:2.3:o:debian:debian_linux:13:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "packageName": "graphicsmagick",
          "product": "graphicsmagick",
          "vendor": "Debian",
          "versions": [
            {
              "lessThan": "1.4+really1.3.48-1",
              "status": "affected",
              "version": "0",
              "versionType": "deb"
            }
          ]
        },
        {
          "collectionURL": "https://dl.fedoraproject.org/pub/epel",
          "cpes": [
            "cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:*",
            "cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "packageName": "GraphicsMagick",
          "product": "GraphicsMagick",
          "vendor": "Fedora Project",
          "versions": [
            {
              "lessThan": "1.3.48",
              "status": "affected",
              "version": "0",
              "versionType": "rpm"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:graphicsmagick:graphicsmagick:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "1.3.48",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            },
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:debian:debian_linux:11:*:*:*:*:*:*:*",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:debian:debian_linux:12:*:*:*:*:*:*:*",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:debian:debian_linux:13:*:*:*:*:*:*:*",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:*",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:*",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ],
          "operator": "OR"
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Cipher - Causal Security (https://causalsecurity.com/), who discovered the defect and reported it to the GraphicsMagick maintainer on 2026-06-14"
        },
        {
          "lang": "en",
          "type": "remediation developer",
          "value": "Bob Friesenhahn, GraphicsMagick, for the upstream fix"
        }
      ],
      "datePublic": "2026-08-20T09:43:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eA heap out-of-bounds write exists in the Photo CD (PCD) decoder of GraphicsMagick. In \u003ccode\u003eDecodeImage()\u003c/code\u003e (\u003ccode\u003ecoders/pcd.c\u003c/code\u003e), the Huffman delta loop advances its output pointer with \u003ccode\u003eq++\u003c/code\u003e after every decoded delta and never checks it against the end of the heap-allocated luma/chroma plane buffers. The pointer is repositioned only when a sync marker introduces a new plane/row; between sync markers the run length is bounded solely by the input.\u003c/p\u003e\u003cp\u003eA crafted PCD file that positions the pointer near the end of a plane and then supplies a long run of deltas with no intervening sync therefore walks the pointer past the end of the allocation and writes through it. Processing an untrusted PCD file \u2014 for example with \u003ccode\u003egm convert\u003c/code\u003e or \u003ccode\u003egm identify\u003c/code\u003e, or through any application linked against libGraphicsMagick \u2014 can corrupt heap memory beyond the buffers.\u003c/p\u003e"
            }
          ],
          "value": "A heap out-of-bounds write exists in the Photo CD (PCD) decoder of GraphicsMagick. In DecodeImage() (coders/pcd.c), the Huffman delta loop advances its output pointer with q++ after every decoded delta and never checks it against the end of the heap-allocated luma/chroma plane buffers. The pointer is repositioned only when a sync marker introduces a new plane/row; between sync markers the run length is bounded solely by the input.\n\n\n\nA crafted PCD file that positions the pointer near the end of a plane and then supplies a long run of deltas with no intervening sync therefore walks the pointer past the end of the allocation and writes through it. Processing an untrusted PCD file \u2014 for example with gm convert or gm identify, or through any application linked against libGraphicsMagick \u2014 can corrupt heap memory beyond the buffers."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-100",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-100 Overflow Buffers"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "attackVector": "LOCAL",
            "baseScore": 8.4,
            "baseSeverity": "HIGH",
            "exploitMaturity": "NOT_DEFINED",
            "privilegesRequired": "NONE",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "subIntegrityImpact": "NONE",
            "userInteraction": "ACTIVE",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
            "version": "4.0",
            "vulnAvailabilityImpact": "HIGH",
            "vulnConfidentialityImpact": "HIGH",
            "vulnIntegrityImpact": "HIGH",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-787",
              "description": "CWE-787 Out-of-bounds write",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-20T12:56:01.246Z",
        "orgId": "22e2d327-25fe-45d7-9f0c-dcd23b7108df",
        "shortName": "seal"
      },
      "references": [
        {
          "name": "Upstream fix (released in 1.3.48)",
          "tags": [
            "patch"
          ],
          "url": "https://foss.heptapod.net/graphicsmagick/graphicsmagick/-/commit/937cdd9920bd96"
        },
        {
          "name": "GraphicsMagick 1.3.48 ChangeLog entry describing the fix and crediting the reporter",
          "tags": [
            "release-notes"
          ],
          "url": "https://foss.heptapod.net/graphicsmagick/graphicsmagick/-/raw/GraphicsMagick-1_3_48/ChangeLog"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eUpgrade to GraphicsMagick 1.3.48 or later, which bounds the decode output pointer against the end of each plane buffer and over-provisions the buffers.\u003c/p\u003e"
            }
          ],
          "value": "Upgrade to GraphicsMagick 1.3.48 or later, which bounds the decode output pointer against the end of each plane buffer and over-provisions the buffers."
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "Out-of-bounds write in GraphicsMagick PCD decoder",
      "workarounds": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eWhere upgrading is not possible, prevent the PCD and PCDS coders from being used on untrusted input. GraphicsMagick detects PCD by file content, so filtering on filename extension is not sufficient; the coder module must be removed or the format rejected before decoding.\u003c/p\u003e"
            }
          ],
          "value": "Where upgrading is not possible, prevent the PCD and PCDS coders from being used on untrusted input. GraphicsMagick detects PCD by file content, so filtering on filename extension is not sufficient; the coder module must be removed or the format rejected before decoding."
        }
      ],
      "x_generator": {
        "engine": "Vulnogram 1.0.4"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "22e2d327-25fe-45d7-9f0c-dcd23b7108df",
    "assignerShortName": "seal",
    "cveId": "CVE-2026-77118",
    "datePublished": "2026-08-20T12:42:42.952Z",
    "dateReserved": "2026-08-20T12:40:51.495Z",
    "dateUpdated": "2026-08-26T19:51:24.566Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}