WordPress upload permissions expose a Ghostscript image-processing path
WordPress 7.0.4 fixes CVE-2026-65640, an authenticated remote code-execution issue tied to malicious file uploads on sites that use Imagick and Ghostscript. WordPress says an Author-level user or higher could trigger the problem. The official release notes describe the vulnerability as remote code execution through file upload, and WordPress backported the fix to older branches and the 7.1 release candidate.
The attacker already needs the upload_files capability and a site configuration that routes media through Imagick and Ghostscript. Those preconditions narrow the population, but they do not make the issue harmless. Author accounts are often used for content contribution and may be common on multi-author publications. Image processing frequently runs in the same application context as the database credentials and uploaded content.
The danger sits between media validation and image conversion
WordPress accepts a file, checks its type, and may ask an image library to parse or transform it. Ghostscript handles PostScript and related formats. If the upload path reaches Ghostscript with unsafe options, a crafted file can influence the interpreter rather than produce a normal thumbnail. The fix changes how WordPress handles that boundary. The public advisory does not make every parser option or code path a supported test procedure.
Teams should not assume that disabling one plugin or changing a file extension removes the risk. The relevant questions are whether Imagick is installed, whether Ghostscript is reachable from the image-processing chain, and whether Author users can upload the file types that enter it. Check the WordPress health information, host package inventory, and media configuration rather than guessing from the editor UI.
Patch all maintained branches
Update to WordPress 7.0.4, 7.1 RC3 or later, or the appropriate backported release for the branch in use. A managed host may report a core update that does not include the backport for a pinned branch. Verify the actual file version and the package source. If the site uses a deployment pipeline, rebuild the image and deploy the same tested version across web nodes.
After patching, clear object caches and confirm that the updated media code is active on every node. Test a normal JPEG, PNG, and PDF workflow with a non-production account. Do not upload a malicious PostScript file to production as a validation step. Use the vendor's test guidance or a lab copy that has no reachable credentials.
Reduce Author upload authority
Review which roles have upload_files and which can publish or embed the resulting media. A contributor may need to upload drafts, but the site owner should know whether that trust is appropriate for every site. Consider a separate editorial site or lower-privilege workflow for untrusted contributors. Require malware scanning and an allow-list of media formats at the reverse proxy or application layer.
Ghostscript and Imagick should run in a sandbox with a minimal filesystem, no network access, and no long-lived cloud credentials. If the host cannot isolate image processing, disable formats that do not need conversion and route uploads through a dedicated service. Keep the WordPress application account unable to read unrelated secrets on the host.
Investigate suspicious uploads and child processes
Look for Author uploads that created unusually large files, unusual MIME types, or files that triggered repeated image-processing failures. Correlate those events with Ghostscript or ImageMagick child processes, temporary files, and outbound connections. A successful exploit may leave a web shell, a modified plugin, or a scheduled task rather than a visible error.
Review WordPress user changes, plugin and theme file hashes, cron entries, and database options that load code. Compare media metadata with the original file and check for files outside the uploads directory. Preserve web-server logs long enough to reconstruct the request and the later process execution.
A patch plus a cleaner execution model
CVE-2026-65640 is fixed by a core security release, but the underlying design still gives a content author a path into a complex image parser. The durable control is to separate untrusted input, parsing, and secret-bearing application code. Patch first, verify the backport, then reduce the number of accounts and formats that can reach the parser.
Top comments (0)