Vulnerability · Published Feb 24, 2026 · Assigned by GitHub_M

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

Medium 5.7

In plain English

A medium-severity code injection in ImageMagick from ImageMagick. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.7Medium
Exploit odds (30 days)0.3%top 79.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22imagemagick7.1.2.15-r0ALPINE-CVE-2026-25797
Alpine:v3.23imagemagick7.1.2.15-r0ALPINE-CVE-2026-25797
Alpine:v3.24imagemagick7.1.2.15-r0ALPINE-CVE-2026-25797
Debian:12imagemagick8:6.9.11.60+dfsg-1.6+deb12u7DEBIAN-CVE-2026-25797
Debian:12imagemagick8:6.9.11.60+dfsg-1.6+deb12u7DSA-6159-1
Debian:13imagemagick8:7.1.1.43+dfsg1-1+deb13u6DSA-6158-1
Debian:13imagemagick8:7.1.1.43+dfsg1-1+deb13u6DEBIAN-CVE-2026-25797
Debian:14imagemagick8:7.1.2.15+dfsg1-1DEBIAN-CVE-2026-25797
NuGetmagick.net-q16-anycpu14.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-anycpu14.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-openmp-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-openmp-x6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-x6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-hdri-x8614.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-openmp-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-openmp-x6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-openmp-x8614.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q16-x8614.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-anycpu14.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-openmp-arm6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-openmp-x6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-x6414.10.3GHSA-rw6c-xp26-225v
NuGetmagick.net-q8-x8614.10.3GHSA-rw6c-xp26-225v
Ubuntu:25.10imagemagick8:7.1.2.3+dfsg1-1ubuntu0.1UBUNTU-CVE-2026-25797
Ubuntu:25.10imagemagick8:7.1.2.3+dfsg1-1ubuntu0.1USN-8263-1

Affected products (as reported)

VendorProductVersions
ImageMagick ImageMagick >= 7.0.0, < 7.1.2-15< 6.9.13-40

Weakness: CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L

References