WordPress 7.0.4 fixes critical RCE flaw in file uploads

Step by step
How the attack unfolded
Click a phase for details – or let the animation play through.
PHASE 1/4 · Initial Access

The attacker needs an authenticated account with at least the Author role and the upload_files capability.

T1078 – Valid Accounts
  • CVE-2026-65640, CVSS 8.8 (High), vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • The upload_files capability is held by Author, Editor and Administrator by default
  • A single compromised Author account is already sufficient
  • Not anonymously exploitable – authentication is mandatory
PHASE 2/4 · Weaponization

The attacker disguises PostScript content so the file appears to be an ordinary image (e.g. .png).

T1036 – Masquerading
  • Classified as CWE-434 – Unrestricted Upload of File with Dangerous Type
  • WordPress partly checks only the extension while ImageMagick evaluates the real content
  • This mismatch between extension and content is exploited
  • Forced Imagick format specifiers in the filename are also possible
PHASE 3/4 · Delivery

The disguised file is delivered into media processing through one of the upload paths.

T1105 – Ingress Tool Transfer
  • Relevant path: XML-RPC interface (wp.uploadFile)
  • Additional path: cover-art extraction from uploaded MP3 files
  • Precondition: Imagick AND Ghostscript are active on the server
  • Affected versions 4.7.0 through 7.0.3
PHASE 4/4 · Execution

Ghostscript processes the embedded PostScript content, resulting in arbitrary code execution on the web server.

T1203 – Exploitation for Client Execution
  • Imagick hands the file to Ghostscript, which has a weakness handling certain embedded files
  • Result: Remote Code Execution (RCE) in the server context
  • Impact on confidentiality, integrity and availability each rated high (C:H/I:H/A:H)
  • Patch (commit 7daaa50…) inspects file data before Imagick processing and rejects PostScript signatures
Short & clear answers
Frequently asked questions about this incident
Am I affected by CVE-2026-65640?
All WordPress versions from 4.7.0 to 7.0.3 are affected, but only if Imagick AND Ghostscript are used on the server and an attacker holds the upload_files capability (available by default from the Author role upward). Sites with multiple authors, membership portals or customer areas are especially exposed. Even without this combination you should update, since your version falls within the affected range.
What do I need to do now?
Update the WordPress core immediately to 7.0.4 or the matching patched release for your branch (e.g. 6.9.7, 6.8.8, down to 4.7.35). Create a tested backup beforehand and document the version, time and result. You can update via Dashboard → Updates → “Update Now” or by downloading from WordPress.org.
How dangerous is this vulnerability?
The flaw is rated “High” with a CVSS score of 8.8 out of 10 and enables remote code execution, meaning foreign code can run on your server. However, it is not exploitable anonymously: an attacker needs a logged-in account with upload permissions. At the time of research there was no confirmed active exploitation, but public exploits often appear after a patch is released.
How do I check whether Imagick and Ghostscript are active on my server?
With administrative server access, `php -m | grep -i imagick` shows whether the PHP extension is active, and `gs --version` shows whether Ghostscript is present. If a command is unavailable, that alone does not prove its absence. In managed hosting environments your provider should give binding information on whether both components are used together.
Have I already been attacked and how would I know?
Check the Users section in the backend for unknown accounts, and review your uploads and your server, web server and PHP logs for suspicious entries. Such a finding warrants a professional incident-response review, but is not by itself proof of exploitation. No reliable figures on compromised installations have been published, and active exploitation was not confirmed at the time of research.
More security news
You might also be interested in
Critical Elementor Pro Flaw: Attackers Can Fully Take Over WordPress Sites
A file upload bug in Elementor Pro up to 4.2.1 allows RCE without login. Version 4.2.2 fixes the flaw – update now!
Pods Plugin: Critical Flaw Enables Admin Takeover, No Login
A critical flaw in the WordPress plugin Pods lets attackers overwrite admin passwords without login. Over 100,000 sites are affected.
miniOrange SAML SSO: Critical Bypass Turns Attackers Into Admins
Two critical auth bypasses in the miniOrange SAML SSO plugin allow forged SAML assertions—up to full WordPress admin access.