CVE-2026-56378: ImageMagick PCD Heap Out-of-Bounds Read
ImageMagick versions before 7.1.2-15 and 6.x before 6.9.13-40 contain a flaw in how they process PCD (Kodak Photo CD) image files. When a specially crafted PCD file is decoded, the application reads one byte beyond the allocated heap memory region. This can cause the application to crash (denial of service) or leak a single byte of nearby memory, which could potentially contain sensitive data. The vulnerability requires a user or system to open a malicious PCD file to trigger the issue.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.7 LOW · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- Weaknesses (CWE)
- CWE-125
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-21 / 2026-06-26
NVD description (verbatim)
ImageMagick before 7.1.2-15 (and 6.x before 6.9.13-40) contains a heap out-of-bounds read in the PCD coder's DecodeImage loop. A crafted PCD file can trigger a one-byte heap out-of-bounds read during image decoding, resulting in denial of service and potential disclosure of an adjacent heap byte.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-56378 is a heap out-of-bounds read vulnerability in ImageMagick's PCD coder, specifically within the DecodeImage loop. The root cause is insufficient bounds checking when processing PCD image data during decoding operations. An attacker can craft a PCD file with malformed image parameters that cause the decoder to read one byte past the end of an allocated heap buffer. This violates memory safety and creates two distinct security consequences: service disruption through crash (denial of service) and potential information disclosure of an adjacent heap byte. The vulnerability affects both the current 7.x branch (before 7.1.2-15) and the legacy 6.x branch (before 6.9.13-40).
Business impact
Organizations relying on ImageMagick for automated image processing, document conversion pipelines, or content management systems face dual risks. Availability impact stems from denial-of-service conditions if malicious PCD files are processed, potentially disrupting batch operations or user-facing image services. The information disclosure aspect, while limited to a single byte, presents a secondary concern in environments handling sensitive metadata or confidential image content, as heap memory may contain cryptographic material, authentication tokens, or other sensitive artifacts. The low CVSS score reflects the attack constraints and limited scope, but should not minimize the importance of patching in production environments.
Affected systems
ImageMagick 7.x versions before 7.1.2-15 and ImageMagick 6.x versions before 6.9.13-40 are affected. Any system using ImageMagick for image processing is potentially vulnerable if it accepts PCD files from untrusted sources. This includes web services that process user-uploaded images, automated image conversion pipelines, document scanning and OCR workflows, and any containerized or serverless functions that invoke ImageMagick. Systems with ImageMagick installed as a dependency of other software (such as media libraries or web frameworks) should verify their specific version.
Exploitability
Exploitation requires a user or system to process a crafted PCD file through ImageMagick. The attack has no network-native exploitation path—delivery depends on user interaction or system misconfiguration. The vulnerability does not yield remote code execution and has high attack complexity (AC:H in CVSS terms), as the attacker must craft a specific malformed file that triggers the exact boundary condition. The impact is constrained to denial of service (predictable crash) or disclosure of a single byte, making large-scale information theft impractical. No active exploitation attempts have been reported in the KEV catalog.
Remediation
Update ImageMagick to version 7.1.2-15 or later for the 7.x branch, or to 6.9.13-40 or later for systems still on 6.x. Organizations unable to update immediately should restrict PCD file processing to trusted sources only, implement input validation to reject suspicious file structures, or disable PCD support in ImageMagick if not required. Verify patch versions against official ImageMagick release notes before deployment.
Patch guidance
Priority should be placed on updating production systems that process images from untrusted sources (user uploads, email attachments, external APIs). For 7.x deployments, upgrade to 7.1.2-15 or the latest stable release. For legacy 6.x systems, apply version 6.9.13-40 or migrate to the 7.x branch if operationally feasible. Test patches in a staging environment first to confirm compatibility with existing image processing workflows. Verify that dependent applications and container images are rebuilt or re-pulled to include the patched ImageMagick library.
Detection guidance
Monitor system logs for ImageMagick process crashes or segmentation faults when processing PCD files. In environments with detailed memory safety tooling (ASAN, Valgrind), heap out-of-bounds read events will be flagged during testing. Network-based detection is impractical since the vulnerability is triggered by file content, not network behavior. Apply patches and conduct a brief regression test with benign PCD files to confirm normal operation. In high-risk environments, consider temporarily disabling PCD support via ImageMagick configuration until patches are confirmed deployed.
Why prioritize this
Although the CVSS score is low (3.7), this vulnerability merits prompt attention in any environment processing untrusted image files. The denial-of-service vector can disrupt automated workflows, and information disclosure—while limited—could expose heap artifacts in sensitive contexts. The presence of two distinct impact types (confidentiality and availability) and the relative ease of triggering via a malformed file justifies inclusion in patch planning. Low complexity and no authentication requirement mean the barrier to delivery is minimal once a malicious PCD file is crafted and distributed.
Risk score, explained
The CVSS 3.1 score of 3.7 (LOW) reflects low network attack vector inherent complexity, no privilege elevation, no integrity impact, and limited scope. Confidentiality impact is rated low because only a single byte is disclosed. Availability impact is rated as none in the vector, though denial of service is acknowledged in the vulnerability description. The score appropriately captures the technical constraints but should not discourage patching in production systems handling untrusted image input; contextualize this score within your organization's image processing footprint and threat model.
Frequently asked questions
Can this vulnerability lead to remote code execution?
No. The heap out-of-bounds read does not provide a write primitive or code execution path. The impact is limited to denial of service and single-byte information disclosure.
Do I need to patch if I only process PCD files from internal, trusted sources?
If all PCD files are generated internally and never sourced from users, email, or external APIs, the practical risk is low. However, if there is any possibility of supply chain compromise or accidental introduction of untrusted PCD files, patching remains prudent.
How can I temporarily reduce risk without patching?
If patching is delayed, disable PCD support in ImageMagick configuration (if feasible for your workflows), restrict file upload acceptance to trusted formats, or run ImageMagick in a sandboxed environment with limited heap size to contain potential information disclosure.
Does this affect ImageMagick installations on macOS, Windows, or Linux equally?
Yes, the vulnerability is present in the core PCD decoder and affects all platforms running vulnerable ImageMagick versions. Prioritize patching across all OS variants in your environment.
This analysis is provided for informational purposes. Patch versions, severity ratings, and affected product lists are based on the CVE record dated 2026-06-21 and 2026-06-26. Organizations should verify all patch versions against official vendor advisories before deployment. SEC.co does not provide legal liability for patch testing outcomes. No exploit code is provided; this vulnerability has not been reported in the CISA KEV catalog as of the analysis date. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-56367LOWImageMagick PSB Integer Overflow Information Disclosure
- CVE-2026-42326MEDIUMImageMagick IPTC Out-of-Bounds Read (Medium, 5.1 CVSS)
- CVE-2026-45358MEDIUMImageMagick Off-by-One Meta Encoder Information Disclosure
- CVE-2026-45359MEDIUMImageMagick Heap Buffer Over-Read in Connected Components
- CVE-2026-45624MEDIUMImageMagick Out-of-Bounds Read in Polynomial Distortion
- CVE-2026-47166MEDIUMImageMagick Distributed Cache Heap Over-Read (CVSS 5.7)
- CVE-2026-0130LOWAndroid RTCP Buffer Overflow Information Disclosure Vulnerability
- CVE-2026-0142LOWAndroid AVB RSA Key Parsing Out-of-Bounds Read Information Disclosure