Skip to main content

ImageMagick CVE-2026-106577

| EUVDEUVD-2026-94397 MEDIUM
Code Injection (CWE-94)
2026-10-07 GitHub_M
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft image with malicious label metadata
  2. Delivery
    Deliver image to conversion workflow
  3. Exploit
    Victim converts image to PostScript/PDF
  4. Execution
    Injected PostScript operators executed on render
  5. Impact
    Code 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

ImageMagick 7.0.0, < 7.1.2-31
ImageMagick < 6.9.13-56

Affected Packages

euvd imagemagick fix: 6.9.13-56, 7.1.2-31

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Oct 07, 2026 - 17:18 EUVD
CVE Published
Oct 07, 2026 - 15:39 cve.org
MEDIUM 5.3

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

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
widely embedded image-processing library across web and server stacks
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

CVE-2016-3714 HIGH POC
8.4 May 05

The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.

CVE-2016-3718 MEDIUM POC
5.5 May 05

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

CVE-2016-3715 MEDIUM POC
5.5 May 05

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

CVE-2017-15277 MEDIUM POC
6.5 Oct 12

ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc

CVE-2016-5841 CRITICAL POC
9.8 Dec 13

Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv

CVE-2016-3717 MEDIUM POC
5.5 May 05

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

CVE-2016-5118 CRITICAL
9.8 Jun 10

The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit

CVE-2016-5689 CRITICAL POC
9.8 Dec 13

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

CVE-2016-5690 CRITICAL POC
9.8 Dec 13

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

CVE-2016-5691 CRITICAL POC
9.8 Dec 13

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

CVE-2017-14138 CRITICAL POC
9.8 Sep 04

ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer

CVE-2026-23876 CRITICAL POC
9.8 Jan 20

Heap buffer overflow in ImageMagick's XBM image decoder (ReadXBMImage) lets remote attackers write attacker-controlled d

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy