CVE-2026-7252: WP-Optimize <= 4.5.2 - Authenticated (Author+) Arbitrary File Deletion via 'original-file' Post Meta
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 unscheduledoriginalfiledeletion 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performanceto a version that resolves this vulnerability.Fixed in 4.5.2 - Compensating control
Restrict authenticated access to the WordPress media editing capabilities so that untrusted users (including Authors) cannot create or modify the 'original-file' post meta key via the standard Edit Media form or the REST API.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-7252?
CVE-2026-7252 has been classified as a high severity vulnerability due to its potential to allow authenticated users to delete arbitrary files.
How do I fix CVE-2026-7252?
To fix CVE-2026-7252, update the WP-Optimize plugin to version 4.5.3 or later, where the vulnerability has been patched.
Who is affected by CVE-2026-7252?
CVE-2026-7252 affects installations of the WP-Optimize plugin version 4.5.2 or earlier on WordPress.
What is exploited in CVE-2026-7252?
CVE-2026-7252 is exploited through insufficient file path validation that allows authenticated users to delete files.
Can CVE-2026-7252 be prevented?
Preventing CVE-2026-7252 involves regularly updating the WP-Optimize plugin and monitoring user permissions.