Out-of-bounds write in GraphicsMagick PCD decoder

Summary

CVECVE-2026-77118
StatePUBLISHED
Assignerseal
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-20 13:19:07 UTC
Updated2026-08-20 13:19:07 UTC
DescriptionA 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.

Risk And Classification

Primary CVSS: v4.0 8.4 HIGH from 22e2d327-25fe-45d7-9f0c-dcd23b7108df

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

EPSS: 0.001310000 probability, percentile 0.031330000 (date 2026-08-21)

Problem Types: CWE-787 | CWE-787 CWE-787 Out-of-bounds write


VersionSourceTypeScoreSeverityVector
4.022e2d327-25fe-45d7-9f0c-dcd23b7108dfSecondary8.4HIGHCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/C...
4.0CNACVSS8.4HIGHCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS v4.0 Breakdown

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Confidentiality
High
Integrity
High
Availability
High
Sub Conf.
None
Sub Integrity
None
Sub Availability
None

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA GraphicsMagick Group GraphicsMagick affected 1.0.0 1.3.48 semver Linux, Windows, macOS
CNA Debian Graphicsmagick affected 1.4+really1.3.48-1 deb Not specified
CNA Fedora Project GraphicsMagick affected 1.3.48 rpm Not specified

References

ReferenceSourceLinkTags
foss.heptapod.net/graphicsmagick/graphicsmagick/-/raw/GraphicsMagick-1_3_48/Cha... 22e2d327-25fe-45d7-9f0c-dcd23b7108df foss.heptapod.net
foss.heptapod.net/graphicsmagick/graphicsmagick/-/commit/937cdd9920bd96 22e2d327-25fe-45d7-9f0c-dcd23b7108df foss.heptapod.net
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Cipher - Causal Security (https://causalsecurity.com/), who discovered the defect and reported it to the GraphicsMagick maintainer on 2026-06-14 (en)

CNA: Bob Friesenhahn, GraphicsMagick, for the upstream fix (en)

Additional Advisory Data

Solutions

CNA: 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.

Workarounds

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report