Skip to content
senn-techsenn-tech
Back to blog
Security
Security and data protection2026-11-15· By Franz Senn

ImageTragick2: A policy.xml decides whether ImageMagick reads your files

On November 12, 2026 CERT/CC published note VU#580079, ImageTragick2. RyotaK of GMO Flatt Security reported the flaws. A crafted SVG or PostScript image can read or write files that the ImageMagick process can reach. The sentence worth reading sits in the solution paragraph: according to the note, updating ImageMagick alone may fall short while the policy still permits dangerous coders and delegates.

ImageTragick2 in one paragraph: ImageMagick uses a file called policy.xml to decide which formats (coders) and external programs (delegates) it may use. The project treats anything that file allows as configuration. An attacker who can upload an image therefore exploits an overly open default.

The two variants

Variant 1 runs through SVG. An <image> element points via xlink:href at MSL:, ImageMagick executes the content as a Magick Scripting Language script and writes data to chosen paths. Variant 2 uses content-based detection: a file that claims to be something else is recognized as PostScript and handed to Ghostscript. Ghostscript runs with -dSAFER, but in the configuration the note observed it could still read and write in /tmp. For variant 2 the note lists WordPress as CVE-2026-65640. We cross-read that entry (NVD, whose page blocks bots, so we read the content through the CVE JSON API): remote code execution via a crafted PostScript upload by a user at author level or higher, when Imagick and Ghostscript are in use on the server. WordPress 7.0.4 fixes it. According to the note, Rails shipped 8.0.5.2 and 8.1.4.1 with its own policy.xml for Active Storage.

ImageTragick2: from a crafted image to file accessCrafted imageSVG or PostScript, uploadedImageMagick readspolicy.xmlthe open default allowscoders and delegatesCoder or delegatestartsVariant 1: MSL via SVG,variant 2: Ghostscript viaPostScriptRead or write a fileanything the process canreach
The protection lives in the configuration: according to CERT/CC an update alone does not close the path while the policy stays open. (Quelle: CERT/CC VU#580079)

Measured on one of our own hosts

On November 15, 2026 we checked one of our Linux hosts (Alpine) that runs website containers, read-only over SSH. It is a production host, not a playground.

CheckResultHow
ImageMagick7.1.2-35 installedmagick -version
Active rules in policy.xmlone: Undefined = nonefile read with comments stripped
Coders MSL, MVGreadable, not blocked by policyread test on a missing file: error "unable to open"
PS, EPS, PDF"no decode delegate"gs not installed
SVG"delegate failed"rsvg-convert not installed
Website containerno ImageMagick, only the sharp image librarydocker exec

So the policy is the open default and MSL is available. Neither variant can run on this host, and the reason is missing programs: without Ghostscript variant 2 is out, and the SVG reader fails. Whether variant 1 is fully ruled out without rsvg-convert we did not test; that part is inference. We found no service on this host that calls ImageMagick: grep for magick and convert in the cron directories, which magick convert gm in all running containers and ps, no hits each time.

Check and harden

  • magick -list policy shows what really applies. Only Undefined means open.
  • magick msl:/missing null: reports either a policy violation or just the missing file. Run the same probe for mvg, ps, eps, pdf, svg.
  • Set an allowlist: coder and delegate to none for *, then enable only the formats you need, for example JPEG, PNG, WebP. ImageMagick's own policy page provides templates in the open, limited, secure and websafe profiles. We have not tested this allowlist under a production load.
  • Process foreign images in a separate container with a minimal filesystem.

For recording runtime versions across a fleet, see Logging runtime versions yourself; a similar case with a measurement is Brotli in Node and Python. More of this kind is collected under Security and privacy. If you want to know where ImageMagick runs in your estate, IT infrastructure and operations starts with exactly that inventory.

Open points: We did not test whether variant 1 is ruled out without rsvg-convert, nor the allowlist under load. We do not show the NVD CVSS rating or the vendor impact list; on the note most vendors are listed as "Unknown".

Read next: 16 Node.js CVEs and our fleet status · llama.cpp 1.0.0 and the open server defaults · two CVSS 10 flaws in GitLab · prompt injection: limiting agent permissions

Further Reading

How we measured our own values: read-only SSH to the host of the website containers, November 15, 2026 around 16:46 CET (magick -version, magick -list policy, read tests, docker exec).

Questions?
Does updating ImageMagick fix ImageTragick2?+

Not by itself, according to CERT/CC. ImageMagick treats the behavior as a configuration matter: whatever policy.xml allows, an image may trigger. The note recommends updating the applications that embed ImageMagick and adding your own allowlist policy on top.

How do I tell whether my system can be affected?+

Run magick -list policy to see the rules that apply. If only the line for Undefined shows up, the policy is effectively open. To see whether a format is blocked, read a file that does not exist: the error message names either the security policy or just the missing file.

Does this reach containers and AI pipelines?+

Yes, the note names containers with image preprocessing explicitly. Writable host mounts and shared volumes raise the damage there. Images from URLs, datasets or model output count as untrusted input.