WordPress security changelog
HIGH CVE-2026-7252 Deferred

WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance: Code execution

WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance is affected by code execution. Exploitation requires at least author-level access. Successful exploitation can run attacker-controlled code in the WordPress hosting account. The published affected range is <= 4.5.2.

CVE / CNA score 8.1 CVSS 3.1 · security@wordfence.com
NVD score Pending NVD has not published its own CVSS assessment.
Component
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance
Plugin slug
wp-optimize
Affected
<= 4.5.2
Safe version
> 4.5.2
Published
May 07, 2026
Weakness
CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

This CVE was published May 07, 2026 and is one of 3 known issues for this plugin.

Update, patch or deactivate.

Update WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance to a release after 4.5.2, or disable and remove it until a fixed version is available.

A safe version is available, so updating to that version or later is the preferred remediation. If an immediate update is not practical, consider a targeted application patch or temporarily restricting the affected functionality.

Deactivate only when warranted by your risk profile, or when advised by your hosting provider in the limited circumstances where the vulnerability cannot otherwise be mitigated. If you’re unsure which action is appropriate, contact Fused or your hosting provider for guidance.

Technical description

The WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the unscheduled_original_file_deletion function in all versions up to, and including, 4.5.2 This makes it possible for authenticated attackers, with author-level access and above, to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php). This is possible because 'original-file' is a public (non-protected) meta key — it does not begin with an underscore — allowing Authors to freely create or modify it on their own attachment posts via the standard Edit Media form or the REST API.

CVE / CNA vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Primary and upstream sources