Descrizione
The NextGEN Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 4.5.5 via the 'ajax_pagination_referrer' request parameter used on the /ngg_tag/<tag>/ taxonomy page. This is due to the plugin reading the pagination base URL from $_REQUEST, preserving the attacker-supplied host on the tag route (where ngg_wprouting_add_post_permalink is forced to false so the plugin does not re-base the links to the site's own permalink), and caching the fully rendered page in a transient keyed only on the request URI (not the request body) for 1800 seconds via NGG_RENDERING_CACHE / PHOTOCRATI_CACHE. This makes it possible for unauthenticated attackers to poison the cached /ngg_tag/<tag>/ page so that its pagination links point to an attacker-controlled host; the plugin's own ajax_pagination.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.2.
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:
- Applicare una Content-Security-Policy restrittiva e regole WAF contro XSS; invitare gli utenti a non aprire link sospetti verso l'applicazione.
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/nextgen-gallery/tags/4.5.5/src/DisplayType/Controller.php#L811
- Riferimentohttps://plugins.trac.wordpress.org/browser/nextgen-gallery/tags/4.5.5/src/DisplayTypes/Taxonomy.php#L96
- Riferimentohttps://plugins.trac.wordpress.org/browser/nextgen-gallery/tags/4.5.5/src/DisplayTypes/Thumbnails.php#L128
- Riferimentohttps://plugins.trac.wordpress.org/browser/nextgen-gallery/tags/4.5.5/src/DisplayedGallery/Renderer.php#L460
- Riferimentohttps://plugins.trac.wordpress.org/browser/nextgen-gallery/tags/4.5.5/src/Util/RoutingApp.php#L627
- Riferimentohttps://plugins.trac.wordpress.org/browser/nextgen-gallery/tags/4.5.5/static/Thumbnails/ajax_pagination.js#L21
- Riferimentohttps://plugins.trac.wordpress.org/changeset/3793263/nextgen-gallery/trunk/src/DisplayTypes/Thumbnails.php
- Riferimentohttps://plugins.trac.wordpress.org/changeset?reponame=&new=3793265%40nextgen-gallery&old=3773861%40nextgen-gallery
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/eb17bfea-9648-4395-b69e-b159f3bdfef5?source=cve