Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft image with malicious label metadata
-
DeliveryDeliver image to conversion workflow
-
ExploitVictim converts image to PostScript/PDF
-
ExecutionInjected PostScript operators executed on render
-
ImpactCode execution in rendering context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires ImageMagick to WRITE output through its PostScript or PDF coders (ps, ps2, ps3, or pdf) while processing an image that carries an attacker-controlled label (e.g., set via -label or embedded caption/metadata); the fix shows these labels were emitted into the output stream without EscapeParenthesis() escaping, allowing PostScript operators to be injected. The injected code only executes when the generated PostScript/PDF is subsequently processed by a PostScript/PDF interpreter such as Ghostscript. Limiting factors: the vector is PR:N (unauthenticated) but UI:R and AC:H - a user or automated pipeline must perform the image-to-PS/PDF conversion with label text present AND the output must be rendered, so default image viewing and non-PostScript conversions are unaffected, and versions at or above 7.1.2-31 / 6.9.13-56 are patched. |
| Impact | This is a medium-severity (CVSS 5.3) code-injection flaw whose real-world priority is moderate rather than urgent. The provided CVSS vector (AV:N/AC:H/PR:N/UI:R) shows a network-reachable, unauthenticated issue but with HIGH attack complexity and required user interaction - exploitation depends on a victim or pipeline actually converting an attacker-supplied image into PostScript/PDF and then having that output rendered, so it is not a point-and-click remote exploit. No EPSS score, CISA KEV listing, or public POC was provided, so there is no public exploit identified at time of analysis and no signal of active or widespread exploitation. There is a notable conflict in the data: the Tags label this 'RCE'/'Code Injection' and the source diffs confirm PostScript operators can be injected (which yields code execution once the output is rendered by an interpreter such as Ghostscript), yet the supplied CVSS vector scores C:H/I:N/A:N - i.e., it does not reflect integrity or availability impact or the downstream execution. This gap should be verified against the vendor advisory; the true impact is likely higher than the provided vector suggests, but the HIGH complexity and interaction requirements keep practical urgency in the medium band. |
| Exploit ScenarioDerived | An attacker crafts an image whose label/metadata contains unescaped parenthesis and PostScript operators. When a victim or automated pipeline uses ImageMagick to convert that image into PostScript or PDF (via the ps/ps2/ps3/pdf coders) and the resulting file is later rendered by a PostScript interpreter such as Ghostscript, the injected operators break out of the text string and execute. No public exploit code was identified at time of analysis, but the fix diffs clearly reveal the injection point. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Code injection in ImageMagick's PostScript and PDF output coders allows attacker-controlled text such as an image label to be written into generated PostScript/PDF output without escaping, so an injected PostScript operator can execute when that output is later rendered by an interpreter such as Ghostscript. Affected are ImageMagick 7.x before 7.1.2-31 and 6.x before 6.9.13-56; exploitation is not confirmed actively exploited (CISA KEV) and no public exploit code is identified at time of analysis. The assessed severity is medium (independent CVSS 5.3 / evaluated vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H): the attack is remote and requires no authentication, but exploitation demands a high-complexity chain in which a conversion writes a label out through the ps, ps2, ps3, or pdf coder and the resulting file is subsequently rendered.
RemediationAI
Vendor-released patch: upgrade to ImageMagick 7.1.2-31 (https://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-31) or ImageMagick 6.9.13-56 (https://github.com/ImageMagick/ImageMagick6/releases/tag/6.9.13-56), which apply EscapeParenthesis() escaping in the ps, ps2, ps3, and pdf coders as shown in advisory GHSA-5rg6-j44q-q892 and the referenced commits. Where upgrading is not immediately possible, use an ImageMagick policy.xml to disable the PostScript and PDF write coders (the PS, PS2, PS3, and PDF coder entries) so attackers cannot force output through the vulnerable paths - the trade-off is that legitimate PS/PDF export functionality stops working. Also avoid passing untrusted input to the -label option or trusting embedded captions and metadata when generating PS/PDF, and treat any generated PostScript/PDF from untrusted sources as hostile: do not render it through Ghostscript or another PostScript interpreter without sandboxing (for example Ghostscript -dSAFER with restricted file access), since the injected code only executes at render time. Because exploitation requires the ps/ps2/ps3/pdf writer and a downstream render step, environments that only read images or convert to raster formats are not exposed, but they should still patch on the normal maintenance cycle.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ImageMagick is a widely deployed image-processing library and CLI (CPE cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*). Its PostScript coders (coders/ps.c, coders/ps2.c, coders/ps3.c) and PDF coder (coders/pdf.c) build the output document by formatting label strings directly into PostScript/PDF text. In the vulnerable code, values such as labels were emitted with a '%s' format specifier without calling EscapeParenthesis(), so an unbalanced ')' in a label terminates the enclosing PostScript string literal and any following characters become raw PostScript operators - a classic injection into a generated interpreter language, matching CWE-94 (Improper Control of Generation of Code / Code Injection). The upstream fix (commits 2ba2edfd, 78378cd6 on the 7.x branch and 8794897, d5750d7 on the 6.x branch) routes label output through EscapeParenthesis() in ps.c, ps2.c, ps3.c, and pdf.c (including the Ascii85-encoded path in ps3.c), escaping the parenthesis metacharacters so injected operators stay inert inside the string. Because the payload only becomes executable when the produced PostScript/PDF is interpreted (for example by Ghostscript), the flaw is a stored/staged injection rather than direct code execution inside the ImageMagick process itself, which is why the evaluated vector keeps AC:H and UI:R while rating C/I/A as High.
Know when Imagemagick gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Attacker-supplied image labels are network-deliverable (AV:N, PR:N) but exploitation needs the PS/PDF conversion-and-render workflow (AC:H, UI:R); injected PostScript operators yield full code execution on render, so C/I/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to 7.1.2-31 and 6.9.13-56, unescaped or untrimmed values can inject code into output generated by PostScript coders. This issue is fixed in versions 7.1.2-31 and 6.9.13-56.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Imagemagick
View allThe (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
The (1) HTTP and (2) FTP coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow remote attackers to conduct
The EPHEMERAL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to delete arbitrary fi
ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc
Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv
The LABEL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to read arbitrary files vi
The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
The ReadDCMImage function in DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer
Heap buffer overflow in ImageMagick's XBM image decoder (ReadXBMImage) lets remote attackers write attacker-controlled d
EUVD-2026-94397
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB