CVE-2026-11784: Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization <= 4.2.6 - Cross-Site Request Forgery via 'optml_replace_file' AJAX Action
The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 4.2.6. This is due to missing or incorrect nonce validation on the replacefile function. This makes it possible for unauthenticated attackers to overwrite existing media attachments with attacker-supplied file content by supplying a forged multipart POST request targeting any attachment the victim has editpost capability over via a forged request granted they can trick a site administrator into performing an action such as clicking on a link. The forged request requires a victim with at least Author-level privileges, as the handler enforces a currentusercan('editpost', $id) check; tricking an Author-level or higher user into clicking a crafted link is sufficient to trigger the overwrite against attachments that user can edit.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Remove
Remove
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimizationfrom your environment.Deactivate and uninstall the Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization WordPress plugin if it is not required.
- Compensating control
Deploy a WAF or web-server rule to block requests targeting the plugin's AJAX handler optml_replace_file (for example, block POSTs to admin-ajax.php?action=optml_replace_file or multipart/form-data POSTs with action=optml_replace_file). Restrict access to admin-ajax.php to trusted IPs where feasible.
- Operational
Audit the media library for unexpected or modified attachments and review webserver/application logs for requests to optml_replace_file. Review users with Author-level (or higher) privileges and reduce or reassign privileges where appropriate; notify and train administrators/authors to avoid clicking untrusted links that could trigger forged requests.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-11784?
CVE-2026-11784 has a medium severity rating of 4.3.
How can I fix CVE-2026-11784?
To fix CVE-2026-11784, update the Optimole plugin to version 4.2.7 or later.
What type of vulnerability is CVE-2026-11784?
CVE-2026-11784 is a Cross-Site Request Forgery (CSRF) vulnerability.
Which versions of Optimole are affected by CVE-2026-11784?
All versions of the Optimole plugin up to and including 4.2.6 are affected by CVE-2026-11784.
What causes the vulnerability in CVE-2026-11784?
CVE-2026-11784 is caused by missing or incorrect nonce validation in the replace_file function.