CVE-2026-124969

Optimole <= 4.2.19 - Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename

2026-11-13 15:51
daroo

Strategic Overview

Status
Patched in 4.2.20
Affected Version
<= 4.2.19
CVSS
7.1High
Weakness type
CWE-502 · Deserialization of Untrusted Data
CVE
CVE-2026-124969
View all Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vulnerabilities

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

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C