CVE-2026-25965: ImageMagick's policy bypass through path traversal allows reading restricted content despite secured policy

Published Feb 24, 2026
·
Updated

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, ImageMagick’s path security policy is enforced on the raw filename string before the filesystem resolves it. As a result, a policy rule such as /etc/ can be bypassed by a path traversal. The OS resolves the traversal and opens the sensitive file, but the policy matcher only sees the unnormalized path and therefore allows the read. This enables local file disclosure (LFI) even when policy-secure.xml is applied. Actions to prevent reading from files have been taken in versions .7.1.2-15 and 6.9.13-40 But it make sure writing is also not possible the following should be added to one's policy. This will also be included in ImageMagick's more secure policies by default.

Other sources

ImageMagick’s path security policy is enforced on the raw filename string before the filesystem resolves it. As a result, a policy rule such as /etc/ can be bypassed by a path traversal. The OS resolves the traversal and opens the sensitive file, but the policy matcher only sees the unnormalized path and therefore allows the read. This enables local file disclosure (LFI) even when policy-secure.xml is applied.

Actions to prevent reading from files have been taken. But it make sure writing is also not possible the following should be added to your policy:

<policy domain="path" rights="none" pattern="../"/>

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

GitHub

Affected Software

21 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-Q16-x86<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-x64<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
debian/imagemagick<=8:6.9.11.60+dfsg-1.3+deb11u4, <=8:6.9.11.60+dfsg-1.6+deb12u5, <=8:7.1.1.43+dfsg1-1+deb13u5
8:6.9.11.60+dfsg-1.3+deb11u128:6.9.11.60+dfsg-1.6+deb12u98:7.1.1.43+dfsg1-1+deb13u88:7.1.2.18+dfsg1-18:7.1.2.21+dfsg1-1

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-x64 to a version that resolves this vulnerability.

    Fixed in 14.10.3
  3. Upgrade

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

    Fixed in 14.10.3
  4. Upgrade

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

    Fixed in 14.10.3
  5. Upgrade

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

    Fixed in 14.10.3
  6. Upgrade

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

    Fixed in 14.10.3
  7. Upgrade

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

    Fixed in 14.10.3
  8. Upgrade

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

    Fixed in 14.10.3
  9. Upgrade

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

    Fixed in 14.10.3
  10. Upgrade

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

    Fixed in 14.10.3
  11. Upgrade

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

    Fixed in 14.10.3
  12. Upgrade

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

    Fixed in 14.10.3
  13. Upgrade

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

    Fixed in 14.10.3
  14. Upgrade

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

    Fixed in 14.10.3
  15. Upgrade

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

    Fixed in 14.10.3
  16. Upgrade

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

    Fixed in 14.10.3
  17. Upgrade

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

    Fixed in 14.10.3
  18. Upgrade

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

    Fixed in 14.10.3
  19. Upgrade

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

    Fixed in 14.10.3
  20. Upgrade

    Upgrade debian/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.11.60+dfsg-1.3+deb11u12Fixed in 8:6.9.11.60+dfsg-1.6+deb12u9Fixed in 8:7.1.1.43+dfsg1-1+deb13u8Fixed in 8:7.1.2.18+dfsg1-1Fixed in 8:7.1.2.21+dfsg1-1
  21. Configuration

    Update ImageMagick's policy (e.g., policy.xml / policy-secure.xml-based rules) to include protections that prevent both reading and writing through path traversal, explicitly ensuring /etc/* (and similar restricted paths) cannot be bypassed.

    ImageMagick policy policy rule to prevent both reading and writing via path traversal = Add/ensure a rule that blocks reading and writing (not just reading) for sensitive paths such as /etc/*; writing must also be disallowed so traversal cannot bypass the rule

Event History

Feb 24, 2026
CVE Published
via MITRE·01:20 AM
Data Sourced
via MITRE·01:20 AM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·02:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:16 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·03:40 PM
Data Sourced
via GitHub·03:40 PM
DescriptionSeverityWeaknessAffected Software
May 13, 2026
Data Sourced
via Debian·04:06 AM
DescriptionAffected Software
Data Sourced
via Launchpad·04:06 AM
Description
May 14, 2026
Data Sourced
via Ubuntu·04:06 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-25965?

CVE-2026-25965 has a high severity rating due to its potential to allow unauthorized access to sensitive files.

2

How do I fix CVE-2026-25965?

To fix CVE-2026-25965, update ImageMagick to versions 7.1.2-15 or 6.9.13-40 or later.

3

What type of vulnerability is CVE-2026-25965?

CVE-2026-25965 is a path traversal vulnerability that allows the reading of restricted content.

4

What software is affected by CVE-2026-25965?

CVE-2026-25965 affects versions of ImageMagick prior to 7.1.2-15 and 6.9.13-40.

5

Is there a workaround for CVE-2026-25965?

There is no known workaround for CVE-2026-25965; upgrading to a fixed version is recommended.

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