Descrizione
The Photo Reviews for WooCommerce plugin for WordPress is vulnerable to unauthorized Media Library File Deletion in all versions up to, and including, 1.2.31. This is due to the `delete_reviews_image()` function's `delete_comment` hook trusting attachment IDs supplied via the `wcpr_image_upload_id` POST parameter that were stored in comment meta without any ownership or capability check — `viwcpr_filter_review_image_ids()` verifies only that each submitted ID refers to an attachment post type, not that the submitter uploaded or owns it. This makes it possible for unauthenticated attackers to permanently delete any WordPress media library attachment — including its files on disk as recorded by `wp_delete_attachment()` — by embedding attacker-chosen attachment IDs into a review comment, then waiting for a moderator to remove the review or for WordPress core's `wp_scheduled_delete` cron to purge it after `EMPTY_TRASH_DAYS`. The nonce required to submit the parameter (`wcpr_image_upload`) is a shared public value printed on every product page for guest commenters and does not function as an authentication barrier, making this trivially exploitable without any account.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.4, EPSS 0.3% (percentile 25).
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
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.
Riferimenti
- Riferimentohttps://plugins.trac.wordpress.org/browser/woo-photo-reviews/trunk/admin/admin.php#L2403
- Riferimentohttps://plugins.trac.wordpress.org/browser/woo-photo-reviews/trunk/frontend/frontend.php#L1232
- Riferimentohttps://plugins.trac.wordpress.org/browser/woo-photo-reviews/trunk/frontend/frontend.php#L1267
- Riferimentohttps://plugins.trac.wordpress.org/browser/woo-photo-reviews/trunk/includes/functions.php#L84
- Riferimentohttps://wordpress.org/plugins/woo-photo-reviews/
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/b9a4d8f9-7b25-4c31-8457-2cb45bd17150?source=cve