CVE-2026-119611: Photo Gallery, Sliders, Proofing and Themes <= 4.5.5 - Unauthenticated Stored Cross-Site Scripting via 'ajax_pagination_referrer' Parameter on /ngg_tag/<tag>/
The NextGEN Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 4.5.5 via the 'ajaxpaginationreferrer' request parameter used on the /nggtag/<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 nggwproutingaddpostpermalink 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 NGGRENDERINGCACHE / PHOTOCRATICACHE. This makes it possible for unauthenticated attackers to poison the cached /nggtag/<tag>/ page so that its pagination links point to an attacker-controlled host; the plugin's own ajaxpagination.
Affected Software
Event History
Frequently Asked Questions
Does an attacker need a WordPress account or any user interaction to poison a page?
No. The issue is exploitable without authentication and does not require user interaction from the attacker.
Which site content is exposed to cache poisoning?
The affected route is the /ngg_tag/<tag>/ taxonomy page. On that route, the plugin can retain an attacker-supplied host when generating pagination links.
How long can a poisoned response remain available?
The fully rendered page is stored in a transient cache for 1800 seconds. The cache key uses the request URI rather than the request body, allowing a malicious request to affect later requests for the same URI during that period.
How can I check for evidence of exploitation?
Inspect pagination links on affected /ngg_tag/<tag>/ pages for hosts that do not belong to your site. An attacker-controlled external host in those links is an indicator that the cached page may have been poisoned.