LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 5.7Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

ImageMagick had an injection flaw when creating PostScript and HTML output. A malicious input file could cause unsafe content to be embedded in generated files, which may execute or render when opened by downstream tools such as printers, viewers, or browsers. Patched versions are available.

Executive priority

Treat this as a moderate-priority patching item. It is not currently documented as actively exploited, but it affects common image-processing software and can impact document or print workflows handling untrusted files.

Technical view

Before ImageMagick 7.1.2-15 and 6.9.13-40, ps coders failed to sanitize data written into PostScript headers, enabling arbitrary PostScript injection. The HTML encoder also failed to properly escape strings written into HTML documents. The CVE is rated CVSS 5.7 and mapped to CWE-94.

Likely exposure

Exposure is most likely in systems that use ImageMagick to process attacker-supplied or untrusted image files and export PostScript or HTML output. Servers, document pipelines, print workflows, and web applications with conversion features should be reviewed.

Exploitation context

The provided sources do not report active exploitation, and this CVE is not marked KEV. Risk depends on whether an attacker can supply input and whether generated PostScript or HTML is later processed by tools that interpret embedded content.

Researcher notes

Evidence is limited to the CVE record and ImageMagick advisory. The issue combines PostScript header injection in ps coders with improper HTML escaping. Avoid assuming broader impact beyond ImageMagick versions and output formats named in the sources.

Mitigation direction

  • Upgrade ImageMagick 7.x to 7.1.2-15 or later.
  • Upgrade ImageMagick 6.x to 6.9.13-40 or later.
  • Prioritize systems processing untrusted uploads or generating PostScript or HTML output.
  • Check ImageMagick vendor guidance for any additional hardening recommendations.

Validation and detection

  • Inventory ImageMagick versions across servers, containers, and build images.
  • Flag ImageMagick 7.x earlier than 7.1.2-15.
  • Flag ImageMagick 6.x earlier than 6.9.13-40.
  • Review applications that convert user-supplied files to PostScript or HTML.
  • Confirm patched packages are deployed and older binaries are removed.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-25797 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.7 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.7CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L2.52.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.7Medium
CVSS 3.1 vector shape for CVE-2026-25797Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
ImageMagickImageMagick>= 7.0.0, < 7.1.2-15, < 6.9.13-40Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-94 · source CWE mapping

Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.