PortGate

Advisories · WordPress

CVE-2026-65640 High CVSS 8.8

WordPress core code execution through a PostScript upload

Disclosed 12 Aug 2026 · Last reviewed 2 Dec 2026

An Author can upload an image that is really PostScript. Imagick hands it to Ghostscript, which runs it as a program on the server.

What happened

The image loader passed uploaded files to Imagick without checking their contents, so a PNG name with PostScript inside reached Ghostscript. The fix checks the file content before Imagick sees it.

Affected and patched versions

Affected
WordPress before 7.0.4 on servers where Imagick and Ghostscript are installed. The attacker needs an account that can upload files (Author or higher).
Patched
WordPress 7.0.4 (12 August 2026), with fixes backported to branches back to 4.7.

How to check your server

Check

wp core version
php -m | grep -i imagick; command -v gs

How to fix and harden

  1. Check the WordPress version. Sites with automatic minor updates should already be on 7.0.4 or a patched backport.
  2. Update core, then confirm the version.
  3. If Imagick is not needed, remove it or switch WordPress to GD.
  4. Review which accounts can upload files and remove ones you do not recognise.

Fix

wp core update && wp core version

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON