Optimole <= 4.2.19 - Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename
Strategic Overview
- Status
- Patched in 4.2.20
- Affected Plugin
- Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization
- Affected Version
<= 4.2.19- CVSS
- 7.1High
- Weakness type
- CWE-502 · Deserialization of Untrusted Data
- CVE
CVE-2026-124969
At a glance
CVE-2026-124969 is a high-severity Deserialization of Untrusted Data vulnerability in the Optimole WordPress plugin, affecting versions <= 4.2.19. It carries a CVSS score of 7.1 (reachable over the network; low attack complexity; high availability impact). Exploitation requires no authentication. The issue is fixed in version 4.2.20; sites on affected versions should update now. Disclosed November 2026, reported by daroo.
Vulnerability Overview
The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the replace_urls_in_value function in all versions up to, and including, 4.2.19. This makes it possible for unauthenticated attackers 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). Successful exploitation requires PEAR's Archive_Tar library to be present and loadable on the host (common in official WordPress Docker images and many PHP distributions), and an administrator must subsequently use the plugin's Rename control on any attachment after the attacker has staged a malicious payload in a comment. Successful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no privileges on the target site. A successful exploit has high impact on availability.
CWE-502: Deserialization of Untrusted Data
Reaching this weakness in Optimole <= 4.2.19 takes no account at all. Deserialization of untrusted data means the application reconstructs objects from input a caller controls, letting the attacker choose which classes get instantiated and what their properties hold.
A workable chain turns deserialization into file writes, deletions or code execution, depending on what the loaded classes do in their magic methods. For Optimole the fix is 4.2.20: builds <= 4.2.19 are affected, anything from 4.2.20 onward is not.
Remediation
Update to version 4.2.20, or a newer patched version
How does WordSec protect against this?
Requests carrying this pattern arrive without a session, so nothing upstream of the firewall gets a chance to reject them: WordSec's web application firewall inspects request payloads before WordPress loads them. Classes like this one can leave something behind, so the staged malware scanner is the second half: it looks for dropped files and modified code rather than for the request that created them. None of that substitutes for the fix: Optimole 4.2.20 closes this, and updating the plugin is the step that ends it.
- Firewall
- Scanner
- Login Security
External References
Related records
Other vulnerabilities in Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization
- 7.2CVE-2026-120739: Optimole <= 4.2.18 Stored Cross-Site Scripting
CVE-2026-120739 - 7.2CVE-2026-120677: Optimole <= 4.2.18 Stored Cross-Site Scripting
CVE-2026-120677 - 7.2CVE-2026-119070: Optimole <= 4.2.17 Stored Cross-Site Scripting
CVE-2026-119070 - 7.2CVE-2026-84829: Optimole <= 4.2.11 Stored Cross-Site Scripting
CVE-2026-84829 - 7.2CVE-2026-77365: Optimole <= 4.2.10 Stored Cross-Site Scripting
CVE-2026-77365 - 7.2CVE-2026-57673: Optimole Stored XSS
CVE-2026-57673 - 7.2CVE-2026-5217: Optimole <= 4.2.2 Stored Cross-Site Scripting
CVE-2026-5217 - 6.4CVE-2026-96531: Optimole 4.0.0 - 4.2.12 Stored Cross-Site Scripting
CVE-2026-96531
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C