· via dev.to (home feed)
WordPress 7.0.4 patches CVE-2026-65640, an authenticated RCE via Ghostscript image uploads
WordPress 7.0.4 closes CVE-2026-65640, an authenticated remote code execution flaw that Author-level users could trigger by uploading crafted files on sites that process media with Imagick and Ghostscript.

WordPress has released version 7.0.4 to close CVE-2026-65640, an authenticated remote code execution bug reachable through the media upload system. According to a dev.to article published on November 27, 2026, the vulnerability affects sites whose image handling depends on Imagick and Ghostscript, and it can be triggered by any account holding upload permission — the Author role or above is enough. WordPress's release notes describe the issue as code execution via file upload, and the fix has also been folded into backports for older branches and the 7.1 release candidate.
What the flaw actually is
When WordPress accepts an upload, it checks the file's type and may then hand it to an image library for parsing or thumbnail generation. On some hosts that library chain ends at Ghostscript, the interpreter for PostScript and related formats. As dev.to explains, if the upload path reaches Ghostscript with unsafe options, a deliberately crafted file can bend the interpreter's behaviour rather than render an ordinary image — which is what turns a media upload into executing code on the server. The 7.0.4 patch changes how WordPress polices that boundary, though the public advisory does not spell out every parser option or code path involved, so the write-up cautions against treating the advisory as a test script.
Who is exposed
The preconditions shrink the affected population but leave plenty of real targets. Author accounts exist to contribute content and are common on multi-author publications, so a bug that starts there is far from theoretical. Dev.to also notes that image processing frequently runs in the same application context as the database credentials and the uploads directory, meaning a successful exploit inherits broad access. The article recommends confirming the actual configuration — whether Imagick is installed, whether Ghostscript is reachable from the processing path, and which roles can upload the file types that feed into it — using WordPress health information and host package inventories rather than assumptions drawn from the editor interface.
Patching and verification
The fix ships in WordPress 7.0.4, in 7.1 RC3 or later, and in backported releases for maintained older branches. One operational trap the write-up highlights: a managed host may report an available core update that never actually includes the backport for a pinned branch, so teams should verify the version in the files themselves and confirm where the package came from. Deployments should push the same tested version to every web node, then clear object caches and confirm the updated media code is live across the fleet. The suggested post-patch check is a routine JPEG, PNG and PDF upload from a non-production account — the article explicitly warns against uploading a malicious PostScript file to production as validation, pointing instead to vendor guidance or a lab copy with no reachable credentials.
Hardening the upload path
Because the patch fixes this bug without changing the design that gave an author a route into a complex parser, dev.to argues for shrinking the surface. Audit which roles hold the upload_files capability and whether untrusted contributors genuinely need it; a lower-privilege workflow or a separate environment for guest writers contains the risk. Malware scanning plus a format allow-list at the reverse proxy or application layer adds a second gate. Ghostscript and Imagick themselves should run in a sandbox with a stripped-down filesystem, no network access and no standing cloud credentials — and where the host cannot provide that isolation, formats that need no conversion should be turned off or uploads routed to a dedicated service. The WordPress application account should also be unable to read unrelated secrets on the host.
Hunting for signs of compromise
Sites that ran a vulnerable setup should look for Author uploads that produced oversized files, unexpected MIME types or repeated image-processing failures, and correlate them with Ghostscript or ImageMagick child processes, temporary files and outbound connections. A successful exploit is more likely to leave a web shell, a tampered plugin or a new scheduled task than a visible error, so the article also suggests reviewing user account changes, plugin and theme file hashes, cron entries, and database options capable of loading code, plus any files found outside the uploads directory. Web-server logs should be retained long enough to reconstruct both the original request and the process execution that followed.
Why it matters
An authenticated bug with configuration requirements is easy to deprioritise, but the profile here matches many ordinary sites: multi-author publications running a standard image stack. The payoff for an attacker is code execution in the same context that holds the database credentials and every uploaded file — effectively site-level compromise. The immediate lesson is to update to 7.0.4 or the matching backport and verify it actually landed; the longer one is architectural, keeping user-supplied content, the parsers that interpret it and the credential-holding application code separated. Dev.to points readers to the WordPress release notes, the CVE-2026-65640 record, GitHub advisory GHSA-8vr3-7mxf-gx8w and a CERT/CC note on ImageMagick as further references.
- #wordpress
- #security
- #vulnerability
- #ghostscript
- #image-processing