1-minute read of a 5 min report

WordPress Image Upload Flaw Lets Authors Run Server Code

By

1-minute read

What a defender needs to know

CVE-2026-65640 lets an authenticated WordPress user with upload_files turn a disguised PostScript upload into server-side code execution when both Imagick and Ghostscript process media. WordPress 7.0.4 and exact backports through 4.7 move content and filename validation ahead of Imagick. The project reports no active exploitation or affected-site count.

Inventory every production, staging, recovery, and forgotten site. Record its running core version, PHP Imagick state, Ghostscript availability, and accounts or roles with upload permission. An affected branch is superseded by 7.0.4, 6.9.7, 6.8.8, 6.7.7, 6.6.7, 6.5.10, 6.4.10, 6.3.10, 6.2.11, 6.1.12, 6.0.14, 5.9.16, 5.8.15, 5.7.17, 5.6.19, 5.5.20, 5.4.21, 5.3.23, 5.2.26, 5.1.24, 5.0.27, 4.9.31, 4.8.30, or 4.7.35 as appropriate.

Verify from the deployed site with wp core version --extra, check Imagick with wp eval 'echo extension_loaded("imagick") ? "imagick=yes\\n" : "imagick=no\\n";', and run command -v gs && gs --version on the application host. After updating, confirm a known-good JPEG still produces thumbnails. In a controlled non-production test, a .png file beginning with the harmless PostScript marker %! should return “File is not an image” and must not create a Ghostscript child process.

Primary sources