CVE-2026-25966
C# vulnerability analysis and mitigation

Overview

CVE-2026-25966 is a security policy bypass vulnerability in ImageMagick that allows local attackers to circumvent the "secure" policy's restriction on reading from or writing to standard streams (stdin/stdout) by using fd:<n> pseudo-filenames (e.g., fd:0, fd:1). It affects 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 packages prior to version 14.10.3. The vulnerability was published on February 23–24, 2026, by maintainer dlemstra via a GitHub Security Advisory. The CVSS v3.1 base score is 5.9 (Moderate) per the GitHub Advisory, though Red Hat's scoring assigns it 7.8 (High) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is an incomplete denylist in ImageMagick's config/policy-secure.xml (CWE-284: Improper Access Control; CWE-184: Incomplete List of Disallowed Inputs). The secure policy template blocks access to standard stream paths (e.g., -, /dev/stdin) but does not account for ImageMagick's fd:<n> pseudo-filename syntax, which directly references open file descriptors by number. An attacker with local access can supply a filename like fd:0 or fd:1 to an ImageMagick command or API call, bypassing the policy's intent and gaining read/write access to standard input/output streams. No elevated privileges or user interaction are required for exploitation (GitHub Advisory, Red Hat Bugzilla).

Impact

Successful exploitation allows a local attacker to read from or write to standard input/output streams in contexts where the ImageMagick secure policy was intended to prevent such access. This can result in unauthorized data access (confidentiality impact), data manipulation or injection (integrity impact), and potential disruption of processing pipelines (availability impact). In environments where ImageMagick processes untrusted input — such as web applications or automated image pipelines — this bypass could be leveraged to exfiltrate data passed through stdin or inject malicious content into stdout-consuming processes (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify a vulnerable target: Confirm the target system is running ImageMagick prior to version 7.1.2-15 (7.x) or 6.9.13-40 (6.x) with the "secure" security policy enabled (typically at /etc/ImageMagick-7/policy.xml or similar).
  2. Verify policy gap: Check that the policy blocks standard stream paths (e.g., pattern="-") but does not include a rule blocking fd: pseudo-filenames.
  3. Craft a malicious command: Invoke ImageMagick with an fd:<n> pseudo-filename as input or output, for example: convert fd:0 output.png to read from stdin, or convert input.png fd:1 to write to stdout.
  4. Bypass policy enforcement: Because the secure policy does not include a deny rule for the fd: path pattern, ImageMagick processes the file descriptor reference without triggering a policy violation.
  5. Achieve unauthorized stream access: The attacker can now read sensitive data from stdin (e.g., piped secrets or credentials) or write controlled content to stdout (e.g., injecting data into a downstream process) (GitHub Advisory).

Indicators of compromise

  • Logs: ImageMagick command invocations in system or application logs containing fd:0, fd:1, or other fd:<n> pseudo-filenames as input or output arguments, particularly in environments where the secure policy is expected to be enforced.
  • Process: Unusual ImageMagick (convert, magick) processes with file descriptor arguments (fd:) in their command line, visible via ps aux or process auditing tools (e.g., auditd).
  • File System: Unexpected output files or modified files in directories writable by the ImageMagick process, potentially resulting from stdout redirection via fd:1.
  • Network: In web application contexts, anomalous HTTP responses containing raw image data or binary content that may indicate stdout stream capture (GitHub Advisory).

Mitigation and workarounds

Upgrade ImageMagick to version 7.1.2-15 or later (7.x branch) or 6.9.13-40 or later (6.x branch), which include updated secure policy templates that block fd:<n> pseudo-filenames by default. For Magick.NET users, upgrade to version 14.10.3 or later. As an interim workaround for systems that cannot be immediately patched, manually add a deny rule for the fd: path pattern to your policy.xml security policy file (e.g., <policy domain="path" rights="none" pattern="fd:*"/>). Downstream Linux distributions including SUSE, openSUSE, Debian, and Amazon Linux 2 have issued updated packages (GitHub Advisory, Red Hat Bugzilla).

Community reactions

The vulnerability was disclosed by ImageMagick maintainer dlemstra via a GitHub Security Advisory rated Moderate severity. Red Hat tracked the issue via Bugzilla (Bug 2442122) and assigned it medium priority. Multiple Linux distributions — including SUSE, openSUSE Tumbleweed, Debian, and Amazon Linux 2 — issued security updates addressing this CVE. No significant social media discussion or notable independent researcher commentary has been identified beyond standard distribution security announcements (Red Hat Bugzilla, 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