# CVE-2026-77118: graphicsmagick: A heap out-of-bounds write exists in the Photo CD (PCD) decoder of GraphicsMagick

CVE-2026-77118 is fixed in 11 products on 1 platform, first by ALAS2023-2026-1960, released July 20, 2026. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2026-77118
- Priority: High
- CVSS: n/a (important)
- EPSS: 0.0017
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jul 20, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | GraphicsMagick amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-c++ amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-c++-debuginfo amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-c++-devel amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-debuginfo amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-debugsource amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-devel amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-doc amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-perl amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | GraphicsMagick-perl-debuginfo amzn 2023 | 1.3.45-1.amzn2023.0.3 | [ALAS2023-2026-1960](https://patchblox.com/security/data/fix/linux/alas2023-2026-1960.md) | Jul 20, 2026 |
| Linux | graphicsmagick Debian 14 | 1.4+really1.3.48-1 | [DEBIAN-CVE-2026-77118](https://patchblox.com/security/data/fix/linux/debian-cve-2026-77118.md) | Aug 20, 2026 |

---

Data as of 2026-11-10T01:44:33Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
