Descrizione
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.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.1, EPSS 0.5% (percentile 40).
Versioni da aggiornare
- optimole Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization: vulnerabili le versioni fino alla
4.2.19inclusa → aggiornare a una release successiva alla4.2.19.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Bloccare l'accesso esterno agli endpoint che ricevono oggetti serializzati e, se supportato, abilitare una allowlist delle classi deserializzabili.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| optimole | Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization | ≤ 4.2.19 | — |
Riferimenti
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L319
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L415
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L548
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_edit.php#L311
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_rename.php#L107
- Riferimentohttps://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.20
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/277b9a34-8e0b-496e-b07b-602b25f125d8?source=cve