Vulnerabilities · Application Security
ImageMagick flaw lets attackers read and write files on servers
A new vulnerability in ImageMagick could let attackers read or write files on servers running default settings. Applications like WordPress and MediaWiki may be at risk if they process untrusted images.
Ross Grant3 min read

The short version
Researchers found a flaw in ImageMagick, a tool many websites use to process images. If a site uses ImageMagick with its default settings, an attacker could upload a special image and read or write files on the server. This could put user data or the whole site at risk. Some popular platforms like WordPress and MediaWiki may be affected if they use ImageMagick without extra security.
What happened?
A new vulnerability, called ImageTragick2, has been found in ImageMagick, a widely used image-processing tool. According to CERT Coordination Center, attackers can exploit default configurations to read or write files on affected servers. Applications like WordPress, MediaWiki, and ownCloud Classic may be at risk if they process untrusted images. Kiteworks confirmed its products are affected and is working on fixes.
Who is affected
The vulnerability affects applications that use ImageMagick, a popular open-source image-processing tool, with its default or insufficiently restrictive security settings. This includes well-known platforms such as WordPress, MediaWiki, Ruby on Rails, ownCloud Classic, and Redmine. AI image-processing pipelines that use ImageMagick for handling images before or after AI inference are also at risk. According to CERT Coordination Center (opens in a new tab), even containerised deployments and services that process images from uploads, URLs, or automated sources could be vulnerable if they rely on default configurations.
How the flaw works
The issue, called ImageTragick2, involves two main attack methods:
-
SVG MSL injection: Attackers can craft a malicious SVG (Scalable Vector Graphics) file. When ImageMagick processes this file, it can trigger a dangerous coder through the
xlink:hrefattribute. This may allow the attacker to run Magick Scripting Language (MSL) scripts, which can read or write files on the server. -
Ghostscript invocation: ImageMagick may misidentify a crafted file as PostScript and call Ghostscript, a separate program for handling PostScript, EPS, and PDF files. Even with some safety settings, this can allow attackers to read or write files in the
/tmpdirectory. If sensitive data or session files are stored there, they could be exposed or tampered with.
In some cases, attackers could chain these methods to achieve remote code execution, meaning they could run arbitrary code on the server. This risk is higher if the server allows writing to executable locations or shares sensitive directories with containers.
The response
CERT Coordination Center reported the issue and credited RyotaK of GMO Flatt Security Inc. and the pwn.ai team for discovery. Kiteworks, which develops ownCloud Classic, confirmed its products are affected and is working on fixes. They say there is no evidence of exploitation so far and will update users as patches are released. Other vendors have not yet issued public statements.
What you should do
Administrators should not rely solely on updating ImageMagick. The main risk comes from insecure configuration. CERT recommends:
- Apply a custom
policy.xmlthat only allows the formats and operations your application needs. Block dangerous coders and delegates, especially MSL, MVG, PS, EPS, and PDF. - Do not trust the default secure policy template; check your effective policy and test that forbidden formats are rejected.
- Isolate image processing. Run it in a separate, low-privilege environment with limited filesystem access.
- Validate image content, not just filenames or extensions.
- Monitor for unexpected activity, such as policy violations or unusual file creation.
If you use products like WordPress or MediaWiki, watch for vendor updates and apply them as soon as available. AI and container environments should also review their image-processing pipelines for exposure.
Why it matters
Many websites and AI services use ImageMagick to handle images. If attackers can read or write files on these servers, they could steal data, tamper with content, or even take over the system. The risk is higher for sites that let users upload images and have not customised their security settings.
Key points
- A flaw in ImageMagick lets attackers read or write files on servers.
- Default settings in many apps, including WordPress and MediaWiki, are at risk.
- Attackers can use crafted SVG or PostScript files to exploit the bug.
- Fixes require both software updates and stricter security policies.
- No evidence of attacks so far, but admins should act quickly.
Sources
CERT Coordination Center
Research

