Descrizione
The W3 Total Cache plugin for WordPress is vulnerable to unauthorized File Deletion in all versions up to, and including, 2.11.0 via the `ajax_revert()` AJAX handler. The vulnerability exists because the `remove_optimizations()` function reads attacker-controlled values from the unprotected `w3tc_imageservice` post meta key — which carries no underscore prefix and no registered authorization callback, making it writable by any user with `edit_post` capability via WordPress's built-in custom-fields AJAX endpoint — and passes those values directly to `wp_delete_attachment()` with no check that the referenced ID is a child of the caller's own post, is an actual attachment, or that the caller holds `delete_post` capability on it. This makes it possible for authenticated attackers with Author-level access or above to permanently delete any WordPress attachment in the media library, including media files owned by other users along with their associated files on disk, regardless of ownership — a capability not available through the normal WordPress interface. The revert nonce is exposed via `wp_localize_script` on `/wp-admin/upload.php` to any user with `upload_files` capability, ensuring the nonce check that is present does not serve as a meaningful barrier to Author-level exploitation.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.1.
Versioni da aggiornare
- boldgrid W3 Total Cache: vulnerabili le versioni fino alla
2.11.0inclusa → aggiornare a una release successiva alla2.11.0.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Filtrare le sequenze di path traversal sul reverse proxy/WAF ed eseguire il servizio con permessi minimi sul filesystem.
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 |
|---|---|---|---|
| boldgrid | W3 Total Cache | ≤ 2.11.0 | — |
Riferimenti
- Riferimentohttps://github.com/BoldGrid/w3-total-cache/tree/2.11.1
- Riferimentohttps://plugins.trac.wordpress.org/browser/w3-total-cache/tags/2.11.0/Extension_ImageService_Plugin_Admin.php#L1727
- Riferimentohttps://plugins.trac.wordpress.org/browser/w3-total-cache/tags/2.11.0/Extension_ImageService_Plugin_Admin.php#L1734
- Riferimentohttps://plugins.trac.wordpress.org/browser/w3-total-cache/tags/2.11.0/Extension_ImageService_Plugin_Admin.php#L2113
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/abf0adac-e8d7-4438-b9d5-aa3f83e17a29?source=cve