CVE-2026-77118: CWE-787 Out-of-bounds write in GraphicsMagick Group GraphicsMagick
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.
AI Analysis
Technical Summary
The vulnerability is a heap out-of-bounds write in GraphicsMagick's Photo CD decoder (coders/pcd.c). Specifically, in the DecodeImage() function, the Huffman delta loop increments the output pointer (q++) after each decoded delta without verifying it remains within the allocated luma/chroma plane buffers. The pointer is only reset upon encountering a sync marker, so a crafted PCD file that places the pointer near the buffer's end and supplies a long run of deltas without sync markers can cause writes beyond the allocated heap memory. This can lead to heap corruption when processing malicious PCD files with GraphicsMagick version 1.0.0.
Potential Impact
Heap memory corruption can occur when processing specially crafted PCD files, potentially leading to application crashes or undefined behavior. The vulnerability requires local access (AV:L) and user interaction (UI:A) but does not require privileges or authentication. The CVSS 4.0 score is 8.4 (high severity), indicating a significant risk if exploited.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Until a patch is available, avoid processing untrusted PCD files with GraphicsMagick version 1.0.0 or applications linked against libGraphicsMagick that use the PCD decoder.
CVE-2026-77118: CWE-787 Out-of-bounds write in GraphicsMagick Group GraphicsMagick
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 v4.0
Score 8.4high
Affected software
pkg:deb/graphicsmagick/graphicsmagickcpe:2.3:a:graphicsmagick:graphicsmagick:*:*:*:*:*:*:*:*cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:*cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability is a heap out-of-bounds write in GraphicsMagick's Photo CD decoder (coders/pcd.c). Specifically, in the DecodeImage() function, the Huffman delta loop increments the output pointer (q++) after each decoded delta without verifying it remains within the allocated luma/chroma plane buffers. The pointer is only reset upon encountering a sync marker, so a crafted PCD file that places the pointer near the buffer's end and supplies a long run of deltas without sync markers can cause writes beyond the allocated heap memory. This can lead to heap corruption when processing malicious PCD files with GraphicsMagick version 1.0.0.
Potential Impact
Heap memory corruption can occur when processing specially crafted PCD files, potentially leading to application crashes or undefined behavior. The vulnerability requires local access (AV:L) and user interaction (UI:A) but does not require privileges or authentication. The CVSS 4.0 score is 8.4 (high severity), indicating a significant risk if exploited.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Until a patch is available, avoid processing untrusted PCD files with GraphicsMagick version 1.0.0 or applications linked against libGraphicsMagick that use the PCD decoder.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- seal
- Date Reserved
- 2026-08-20T12:40:51.495Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a86fc23acd9273b49a4aafe
Added to database: 08/20/2026, 13:07:47 UTC
Last enriched: 08/20/2026, 13:22:14 UTC
Last updated: 08/20/2026, 14:09:21 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.