CVE-2026-77118
Received Received - Intake

Heap Out-of-Bounds Write in GraphicsMagick PCD Decoder

Vulnerability report for CVE-2026-77118, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-20

Last updated on: 2026-08-20

Assigner: seal

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-20
Last Modified
2026-08-20
Generated
2026-08-20
AI Q&A
2026-08-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
graphicsmagick graphicsmagick *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a heap out-of-bounds write vulnerability in GraphicsMagick's Photo CD (PCD) decoder. It occurs in the DecodeImage function where the output pointer advances without bounds checking, allowing it to exceed allocated memory when processing crafted PCD files with long runs of deltas.

Detection Guidance

Detecting this vulnerability requires checking for GraphicsMagick installations and testing with crafted PCD files. Use commands like 'gm convert -version' to verify GraphicsMagick presence. Monitor for crashes or memory corruption when processing PCD files. No specific detection commands are provided in the context.

Impact Analysis

Processing a malicious PCD file could corrupt heap memory, potentially leading to crashes, data corruption, or arbitrary code execution. This affects any application using libGraphicsMagick, such as gm convert or gm identify.

Compliance Impact

This vulnerability could potentially impact compliance with GDPR and HIPAA by enabling heap memory corruption through crafted PCD files. Unauthorized memory writes may lead to data leaks or integrity issues, violating confidentiality and security requirements under these regulations.

Mitigation Strategies

Immediately update GraphicsMagick to the latest patched version. Avoid processing untrusted PCD files until patched. Disable or restrict access to GraphicsMagick tools like 'gm convert' and 'gm identify' if possible. Monitor for unusual memory corruption or crashes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-77118. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart