CVEfocus › CVE database › CVE-2026-77118

CVE-2026-77118Out-of-bounds write in GraphicsMagick PCD decoder

CVSS 8.4 HighEPSS 0.2% (higher than 4% of CVEs)Published 2026-08-20Updated 2026-08-26Assigner: seal

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.

CWE-787

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
8Fix pending
1Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04graphicsmagickUnder investigationUBUNTU-CVE-2026-77118
Ubuntu 24.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Ubuntu 22.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Ubuntu 20.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Ubuntu 18.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Ubuntu 16.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Ubuntu 14.04graphicsmagickFix pendingUBUNTU-CVE-2026-77118
Debian 14graphicsmagickFixed1.4+really1.3.48-1DEBIAN-CVE-2026-77118
Debian 13graphicsmagickFix pendingDEBIAN-CVE-2026-77118
Debian 12graphicsmagickFix pendingDEBIAN-CVE-2026-77118

What the vendor says

As published in the CVE record by seal, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

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

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

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.