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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.4
- **CVSS:** 8.4 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: Active; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 4, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2026-08-20T12:42:42.952Z
- **Modified:** 2026-10-27T10:10:00.240Z

## Who should check

- Anyone running GraphicsMagick Group GraphicsMagick \>= 1.0.0, \< 1.3.48
- Anyone running Debian graphicsmagick \< 1.4+really1.3.48-1
- Anyone running Fedora Project GraphicsMagick \< 1.3.48

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

## Affected and fixed versions

- GraphicsMagick Group GraphicsMagick: \>= 1.0.0, \< 1.3.48 (cvelist)
- Debian graphicsmagick: \< 1.4+really1.3.48-1 (cvelist)
- Fedora Project GraphicsMagick: \< 1.3.48 (cvelist)

## Mitigation

- Upgrade GraphicsMagick to 1.3.48 or later.
- Upgrade graphicsmagick to 1.4+really1.3.48-1 or later.
- Vendor 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-77118. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-77118.md
Affected: GraphicsMagick Group GraphicsMagick >= 1.0.0, < 1.3.48; Debian graphicsmagick < 1.4+really1.3.48-1; Fedora Project GraphicsMagick < 1.3.48
Fixed in: GraphicsMagick Group GraphicsMagick 1.3.48, Debian graphicsmagick 1.4+really1.3.48-1, Fedora Project GraphicsMagick 1.3.48

Steps:
1. Search this machine and project for GraphicsMagick Group GraphicsMagick, Debian graphicsmagick, Fedora Project GraphicsMagick: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-77118 being exploited?

There is no confirmed exploitation: CVE-2026-77118 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-77118?

High: CVSS 8.4 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-77118?

GraphicsMagick Group GraphicsMagick \>= 1.0.0, \< 1.3.48; Debian graphicsmagick \< 1.4+really1.3.48-1; Fedora Project GraphicsMagick \< 1.3.48.

### Is there a fix for CVE-2026-77118?

Yes. Fixed in GraphicsMagick Group GraphicsMagick 1.3.48, Debian graphicsmagick 1.4+really1.3.48-1, Fedora Project GraphicsMagick 1.3.48. Upgrade GraphicsMagick to 1.3.48 or later. Upgrade graphicsmagick to 1.4+really1.3.48-1 or later. Vendor 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.

### How do I check if I'm affected by CVE-2026-77118?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-77118>

HTML: <https://flawdb.com/CVE-2026-77118> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-77118>
