Optimole <= 4.2.19 - Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename
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.
Deserialization of Untrusted Data CWE-502
The software rebuilds objects from data an attacker can control, which can let them run code.
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
Weakness data: MITRE Common Weakness Enumeration.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| optimole Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization | Software | from 0, up to and including 4.2.19 | not recorded |
The 7.1 severity score (high) from wordfence.com, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Required | A person has to do something first, such as open a file or visit a page. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | None | No data can be read. |
| Data changed | Low | The attacker can change some data, but not everything. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 2.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 4.2 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 7 sources for this flaw, none tagged as a vendor patch.