WordPress security
WordPress 7.0.4. A security update concerning Imagick and Ghostscript
WordPress 7.0.4 fixes vulnerability CVE-2026-65640, related to how uploaded files are processed by Imagick and Ghostscript. The attack requires a logged-in account with permission to upload media, so it isn’t a hole open to any anonymous user. The update is still worth deploying without delay, because a successful attack can result in code execution on the server.
Next step
The update affects environments using Imagick and Ghostscript. Before deploying, check the backup, site compatibility and the processes that depend on media handling.
01
What WordPress 7.0.4 changes
WordPress 7.0.4 was released on 12 August 2026 as a security release. The update improves the way core passes uploaded files to the Imagick library. The aim of the change is to stop files that look like permitted media but actually contain data that can trigger processing by Ghostscript.
The vulnerability was assigned the identifier CVE-2026-65640. The official WordPress announcement describes it as the possibility of remote code execution via a malicious file on sites that use both Imagick and Ghostscript.
02
When the vulnerability can be exploited
This isn’t an attack available without logging in. A potential attacker needs an account with the Author role or higher, or more precisely the capability to upload files to the media library. The server must also use Imagick and Ghostscript to handle certain formats.
These conditions limit the number of exposed scenarios, but they don’t allow the problem to be ignored. An Author account may belong to an employee, an editor, a client or someone handling content. If such an account is compromised, the ability to add media shouldn’t lead to code execution on the server.
03
What a risky scenario looks like
- A user with permission to upload media adds a specially crafted file.
- The file's name, extension or content causes Imagick to choose a dangerous processing path.
- Ghostscript, which interprets PostScript formats, is used to handle the data.
- Under favourable conditions, the processing can lead to code execution with the permissions of the process serving the site.
This doesn’t automatically mean a full takeover of the whole server. The extent of the impact depends on the hosting configuration, the system user’s permissions, site isolation and the environment’s safeguards. Code execution in the site’s process is, however, serious enough for the update to be treated as a priority.
04
What exactly the patch blocks
WordPress 7.0.4 checks the actual content of a file more carefully before passing it to Imagick. Core doesn’t base its decision solely on the name or extension. It also checks the file signature and removes mechanisms that could force the data to be interpreted as a different format.
Among other things, the patch rejects data recognised as PostScript and the related EPS, PS and WPG formats. It also restricts compressed formats that could have been decompressed automatically during processing. For PDF files, the correct format header is checked.
05
How to check whether the environment uses Imagick and Ghostscript
Information about Imagick can be found in WordPress under Tools, Site Health, Info, Media Handling. The server administrator can also check the active PHP extensions and the list of available system programs.
The absence of Imagick or Ghostscript may disable the attack path described, but it shouldn’t be a reason to stay on the old version of WordPress. The security release should also be deployed to keep a supported and predictable core version.
06
What to do before and after the update
- Check the current WordPress version and the history of automatic updates.
- Back up the database and files, and then confirm that the backup can be restored.
- If the site handles sales or important forms, do a trial run in a test environment.
- Install WordPress 7.0.4 or the latest security release available for the branch you use.
- After the update, check login, the media library, thumbnail generation, PDF previews, forms, payments and integrations.
- Review the accounts with permission to upload files and remove access that is no longer needed.
- Check the logs for unusual media operations and Imagick or Ghostscript errors.
07
Is restricting the Author role enough
Removing the ability to upload files from accounts that don’t need it reduces the attack surface, but doesn’t replace the patch. Permissions may be granted again, an account with a higher role may be compromised, and the team’s configuration may change over time.
The safest approach combines an up-to-date core, minimal permissions, account control, restorable backups and log monitoring. Each of these elements limits a different stage of a potential incident.
Related materials and sources
Need to check a WordPress update?
We’ll check the core version, the media processing configuration, the backup and the site’s most important processes. You’ll get a clear scope of work and the results of tests run after the update is deployed.
Only 3 required fields · reply within 1 business day · no obligation
