CVE-2026-25966: ImageMagick's Security Policy Bypass through config/policy-secure.xml via "fd handler" leads to stdin/stdout access

Published Feb 24, 2026
·
Updated

ImageMagick is free and open-source software used for editing and manipulating digital images. The shipped "secure" security policy includes a rule intended to prevent reading/writing from standard streams. However, ImageMagick also supports fd:<n> pseudo-filenames (e.g., fd:0, fd:1). Prior to versions 7.1.2-15 and 6.9.13-40, this path form is not blocked by the secure policy templates, and therefore bypasses the protection goal of "no stdin/stdout." Versions 7.1.2-15 and 6.9.13-40 contain a patch by including a change to the more secure policies by default. As a workaround, add the change to one's security policy manually.

Other sources

The shipped “secure” security policy includes a rule intended to prevent reading/writing from standard streams:

xml <policy domain="path" rights="none" pattern="-"/>

However, ImageMagick also supports fd:<n> pseudo-filenames (e.g., fd:0, fd:1). This path form is not blocked by the secure policy templates, and therefore bypasses the protection goal of “no stdin/stdout”.

To resolve this, users can add the following change to their security policy.

xml <policy domain="path" rights="none" pattern="fd:"/>

And this will also be included in ImageMagick's more secure policies by default.

GitHub

Affected Software

20 affected componentsFixes available
ImageMagick ImageMagick<7.1.2-15, <6.9.13-40
nuget/Magick.NET-Q8-x86<14.10.3
14.10.3
nuget/Magick.NET-Q8-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q8-OpenMP-x64<14.10.3
14.10.3
nuget/Magick.NET-Q8-OpenMP-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q8-AnyCPU<14.10.3
14.10.3
nuget/Magick.NET-QMagick.NET-Q16-x8616-x64<14.10.3
14.10.3
nuget/Magick.NET-Q16-x64<14.10.3
14.10.3
nuget/Magick.NET-Q16-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q16-OpenMP-x86<14.10.3
14.10.3
nuget/Magick.NET-Q16-OpenMP-x64<14.10.3
14.10.3
nuget/Magick.NET-Q16-OpenMP-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q16-HDRI-x86<14.10.3
14.10.3
nuget/Magick.NET-Q16-HDRI-x64<14.10.3
14.10.3
nuget/Magick.NET-Q16-HDRI-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q16-HDRI-OpenMP-arm64<14.10.3
14.10.3
nuget/Magick.NET-Q16-HDRI-AnyCPU<14.10.3
14.10.3
nuget/Magick.NET-Q16-AnyCPU<14.10.3
14.10.3
ImageMagick ImageMagick<6.9.13-40
ImageMagick ImageMagick>=7.0.0-0<7.1.2-15

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/Magick.NET-Q8-x86 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  2. Upgrade

    Upgrade nuget/Magick.NET-Q8-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  3. Upgrade

    Upgrade nuget/Magick.NET-Q8-OpenMP-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  4. Upgrade

    Upgrade nuget/Magick.NET-Q8-OpenMP-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  5. Upgrade

    Upgrade nuget/Magick.NET-Q8-AnyCPU to a version that resolves this vulnerability.

    Fixed in 14.10.3
  6. Upgrade

    Upgrade nuget/Magick.NET-QMagick.NET-Q16-x8616-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  7. Upgrade

    Upgrade nuget/Magick.NET-Q16-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  8. Upgrade

    Upgrade nuget/Magick.NET-Q16-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  9. Upgrade

    Upgrade nuget/Magick.NET-Q16-OpenMP-x86 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  10. Upgrade

    Upgrade nuget/Magick.NET-Q16-OpenMP-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  11. Upgrade

    Upgrade nuget/Magick.NET-Q16-OpenMP-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  12. Upgrade

    Upgrade nuget/Magick.NET-Q16-HDRI-x86 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  13. Upgrade

    Upgrade nuget/Magick.NET-Q16-HDRI-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  14. Upgrade

    Upgrade nuget/Magick.NET-Q16-HDRI-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  15. Upgrade

    Upgrade nuget/Magick.NET-Q16-HDRI-OpenMP-arm64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  16. Upgrade

    Upgrade nuget/Magick.NET-Q16-HDRI-AnyCPU to a version that resolves this vulnerability.

    Fixed in 14.10.3
  17. Upgrade

    Upgrade nuget/Magick.NET-Q16-AnyCPU to a version that resolves this vulnerability.

    Fixed in 14.10.3
  18. Upgrade

    Upgrade ImageMagick to a version that resolves this vulnerability.

    Fixed in 7.1.2-15
  19. Upgrade

    Upgrade ImageMagick to a version that resolves this vulnerability.

    Fixed in 6.9.13-40
  20. Configuration

    Add the following <policy> entries to the ImageMagick security policy (e.g., policy.xml or policy-secure.xml) to block '-' and 'fd:*' path forms and prevent stdin/stdout access: <policy domain="path" rights="none" pattern="-"/> and <policy domain="path" rights="none" pattern="fd:*"/>.

    ImageMagick security policy (policy.xml / policy-secure.xml) policy entries (domain="path") = <policy domain=\"path\" rights=\"none\" pattern=\"-\"/>; <policy domain=\"path\" rights=\"none\" pattern=\"fd:*\"/>

Event History

Feb 24, 2026
CVE Published
via MITRE·01:27 AM
Data Sourced
via MITRE·01:27 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·03:42 PM
Data Sourced
via GitHub·03:42 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-25966?

The severity of CVE-2026-25966 is classified as high due to its ability to bypass security policies and access sensitive data.

2

How do I fix CVE-2026-25966?

To fix CVE-2026-25966, update ImageMagick to version 14.10.3 or later.

3

What impact does CVE-2026-25966 have on ImageMagick users?

CVE-2026-25966 allows remote attackers to bypass security restrictions, potentially leading to unauthorized read/write access via stdin/stdout.

4

Is CVE-2026-25966 present in all ImageMagick versions?

CVE-2026-25966 affects ImageMagick versions up to 6.9.13-40 and 7.1.2-15; always check release notes for specific versions.

5

What should I do if I cannot update ImageMagick immediately due to compatibility issues?

If an immediate update is not possible for CVE-2026-25966, consider applying temporary security measures or isolating affected services until the update can be completed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203