CVE-2026-77118
Out-of-bounds write in GraphicsMagick PCD decoder
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.
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
Vulnerability facts
- 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
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- 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:NOpen in CVSS calculator
Show all 11 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
- EPSS
- 0.17% chance of exploitation in 30 days (percentile 4, 2026-11-26)
- CWE
- CWE-787
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| 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 |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
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-26).
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.