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

- Severity: High 8.4 (CVSS:4.0, scored by seal) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-08-20T12:42:42.952Z
- Modified: 2026-10-27T10:10:00.240Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- GraphicsMagick Group GraphicsMagick: from 1.0.0 before 1.3.48
- graphicsmagick: before 1.4+really1.3.48-1; before 1.3.48

## References

- <https://foss.heptapod.net/graphicsmagick/graphicsmagick/-/commit/937cdd9920bd96> (patch)
- <https://foss.heptapod.net/graphicsmagick/graphicsmagick/-/raw/GraphicsMagick-1_3_48/ChangeLog> (release-notes)

## Sources

- CVE List: [CVE-2026-77118](https://www.cve.org/CVERecord?id=CVE-2026-77118), CVE Terms of Use, modified 2026-08-26
- NVD: [CVE-2026-77118](https://nvd.nist.gov/vuln/detail/CVE-2026-77118), Public domain, modified 2026-10-27

---

Page: https://cve.day/CVE-2026-77118 · Whole record: https://cve.day/CVE-2026-77118.json · Rebuilt by cve.day 2026-11-25T22:59:34.626Z
