CVE-2026-25797 ImageMagick vulnerable to Code injection via PostScript header in ps coders
Attackers can inject arbitrary PostScript or HTML code via malicious image files, leading to code execution when processed by viewers or printers.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-25797?
CVE-2026-25797 is a medium-severity code injection vulnerability in Imagemagick Imagemagick, published on 24 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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, the ps coders, responsible for writing PostScript files, fails to sanitize the input before writing it into the PostScript header. An attacker can provide a malicous file and inject arbitrary PostScript code. When the resulting file is processed by a printer or a viewer (like Ghostscript), the injected code is interpreted and executed. The html encoder does not properly escape strings that are written to in the html document. An attacker can provide a malicious file and injection arbitrary html code. Versions 7.1.2-15 and 6.9.13-40 contain a patch.
Weakness: CWE-94
Which versions are affected by CVE-2026-25797?
36 open source packages ship an affected version, including Magick.NET-Q16-AnyCPU, Magick.NET-Q16-HDRI-AnyCPU and Magick.NET-Q16-HDRI-OpenMP-arm64. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
Magick.NET-Q16-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q16-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-OpenMP-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-OpenMP-arm64 NuGet | All versions | 14.10.3 |
30 more packages
Magick.NET-Q16-HDRI-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-HDRI-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-OpenMP-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q16-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q8-AnyCPU NuGet | All versions | 14.10.3 |
Magick.NET-Q8-OpenMP-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-OpenMP-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-OpenMP-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-arm64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-x64 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-x86 NuGet | All versions | 14.10.3 |
Magick.NET-Q8-x86 NuGet | All versions | 14.10.3 |
Products include Imagemagick Imagemagick.
How do I fix CVE-2026-25797?
Upgrade Magick.NET-Q16-AnyCPU to 14.10.3 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-25797 being exploited?
There is no known exploitation of CVE-2026-25797 in the wild and no public exploit code.
Other vulnerabilities in Imagemagick Imagemagick
Sources
Also known as DEBIAN-CVE-2026-25797, ECHO-cebd-fb2f-c23e, GHSA-rw6c-xp26-225v, JLSEC-2026-947, MINI-w872-74mx-268q, UBUNTU-CVE-2026-25797.