
Proof-of-concept for CVE-2026-42322, a WordPress theme logo upload flaw where MIME validation is bypassed via double extensions, allowing PHP execution.
The logo upload at admin.php?page=themes_standard_pages validates the file with mime_content_type(), which looks at the actual content, but then builds the final filename using the extension that came in the original name. So: you send a shell.svg.php, it sees the content starts with <svg> (mime = image/svg+xml), passes the whitelist, and Apache later executes it as PHP because the last extension is .php.
The vulnerable code is basically this:
$mime_type = mime_content_type($_FILES['std_pgs_logo']['tmp_name']);
$allowed_mimes = array('image/png','image/jpeg','image/svg+xml','image/svg');
$pathinfo = pathinfo($_FILES['std_pgs_logo']['name']);
$filename = str2url($pathinfo['filename']);
$extension = strtolower($pathinfo['extension']);
$new_name = $filename . '.' . $extension;
$file_path = $upload_dir . '/' . $new_name;
Since it's already been fixed, I'm keeping the PoC here for future reference.