CVE-2026-24485
C# vulnerability analysis and mitigation

Overview

CVE-2026-24485 is an infinite loop (denial of service) vulnerability in ImageMagick's PCD file parser. When a PCD file does not contain a valid Sync marker, the DecodeImage() function enters an infinite loop while searching for the marker, causing uncontrolled CPU consumption and system resource exhaustion. Affected software includes ImageMagick versions prior to 7.1.2-15 (7.x branch) and prior to 6.9.13-40 (6.x branch), as well as Magick.NET (NuGet) versions prior to 14.10.3. The vulnerability was disclosed on February 23–24, 2026, and carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Github Advisory).

Technical details

The root cause is classified as CWE-400 (Uncontrolled Resource Consumption) and CWE-835 (Loop with Unreachable Exit Condition / Infinite Loop). In the PCDGetBits macro within coders/pcd.c, the code repeatedly calls ReadBlob() to read 0x800-byte chunks while searching for a valid Sync marker (IsSync). When the PCD file lacks a valid Sync marker, the return value of ReadBlob() was not checked, allowing the loop to continue indefinitely even after reaching end-of-file. The fix (commit 332c156) adds a check on the byte_count returned by ReadBlob() and breaks out of the loop if fewer than 0x800 bytes are read, preventing the infinite loop condition. Exploitation requires only that an attacker supply a malformed PCD file to any service or application that processes images with ImageMagick (GitHub Advisory, Patch Commit).

Impact

Successful exploitation results in a denial-of-service condition: the affected ImageMagick process becomes unresponsive and continuously consumes CPU resources until the system is exhausted or the process is killed. There is no impact on confidentiality or data integrity — the vulnerability is purely an availability issue. Any service or application that relies on ImageMagick for image processing (e.g., web upload handlers, media pipelines, document converters) could be rendered unavailable, potentially affecting dependent services (GitHub Advisory, bugzilla.redhat.com).

Exploitation steps

  1. Craft a malformed PCD file: Create a PCD image file that omits or corrupts the required Sync marker bytes (the marker pattern 0xfffffe00 in the bitstream), ensuring the file is otherwise structurally plausible enough to pass initial parsing.
  2. Identify a target: Locate a service or application that accepts user-supplied image files and processes them with a vulnerable version of ImageMagick (prior to 7.1.2-15 or 6.9.13-40), such as a web-based image upload endpoint.
  3. Submit the malformed file: Upload or submit the crafted PCD file to the target service. No authentication or special privileges are required.
  4. Trigger the infinite loop: ImageMagick's DecodeImage() function in coders/pcd.c begins processing the file and enters the PCDGetBits macro loop, which continuously calls ReadBlob() searching for the missing Sync marker without ever finding it or exiting.
  5. Achieve denial of service: The ImageMagick process consumes 100% of a CPU core indefinitely, causing the host system or dependent service to become unresponsive or unavailable (GitHub Advisory, Patch Commit).

Indicators of compromise

  • Process: An ImageMagick worker process (convert, magick, or an application embedding libMagickCore) pinned at or near 100% CPU utilization for an extended or indefinite period.
  • Logs: Application or web server logs showing a request to process a .pcd file that never completes or times out; error logs may show no output or a timeout/kill signal for the ImageMagick process.
  • File System: Presence of a suspicious or unexpected .pcd file in upload directories or temporary processing directories, particularly one with an unusually small size or missing expected header structure.
  • Network: Repeated submissions of .pcd files from the same source IP, potentially indicating automated DoS attempts against an image-processing endpoint.

Mitigation and workarounds

The primary remediation is to upgrade ImageMagick to version 7.1.2-15 or later (7.x branch) or 6.9.13-40 or later (6.x branch). Magick.NET users should upgrade to version 14.10.3 or later. If immediate patching is not possible, consider: (1) disabling or restricting PCD file processing via ImageMagick's policy.xml (e.g., denying the PCD coder); (2) restricting image upload functionality to trusted users or known-safe file types; and (3) applying OS-level CPU quotas or process timeouts to limit the impact of any runaway ImageMagick process (GitHub Advisory, Magick.NET Release).

Community reactions

The vulnerability received routine coverage across Linux distribution security channels, with security updates issued for Debian (DSA-6158, DSA-6159, DLA-4497), SUSE/openSUSE, Ubuntu, and Amazon Linux 2. No notable researcher commentary or significant social media discussion beyond standard CVE tracking feeds has been identified. The fix was credited to reporter ylwango613 (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-p5rm-jg5c-8c77MEDIUM6.1
  • C# logoC#
  • Microsoft.OpenApi.Kiota
NoYesJul 24, 2026
CVE-2026-62946MEDIUM5.1
  • C# logoC#
  • Magick.NET-Q16-AnyCPU
NoYesJul 24, 2026
CVE-2026-62363MEDIUM5
  • C# logoC#
  • Magick.NET-Q16-HDRI-OpenMP-arm64
NoYesJul 24, 2026
CVE-2026-62343MEDIUM4.7
  • C# logoC#
  • Magick.NET-Q16-OpenMP-arm64
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • @aws-cdk/aws-codebuild
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management