# Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery <= 4.5.4 - Unauthenticated Stored Cross-Site Scripting via Lightbox Link Titles and Captions

- **ID:** WPSEC-2026-2135
- **Plugin:** Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery (`nextgen-gallery`), https://wordpress.org/plugins/nextgen-gallery/
- **Affected versions:** all versions before 4.5.5
- **Fixed in:** 4.5.5 (Update to 4.5.5 or later.)
- **Severity:** Medium 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-10-30)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/nextgen-gallery
- **Fix released:** 2026-10-29
- **Published:** 2026-10-30
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2135/

## Description

The NextGEN Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via link titles and captions shown in its lightbox effects in all versions up to, and including, 4.5.4. This is due to insufficient sanitization and escaping. The Shutter and Shutter Reloaded scripts attach to every link on the page that points to an image file and write the link's title attribute into the lightbox with innerHTML, unescaped. The Thickbox, SimpleLightbox and Fancybox caption sanitizers parsed markup in the live document, did not reliably block javascript: URLs and allowed style attributes. This makes it possible for unauthenticated attackers to inject arbitrary web scripts, for example through the title of an image link in a submitted comment, that execute when a user opens that link in the lightbox.

Also published later by wordfence as CVE-2026-116563.

## References

- https://wpsec.com/vuln/WPSEC-2026-2135/
- https://plugins.svn.wordpress.org/nextgen-gallery/tags/4.5.5/
- https://wordpress.org/plugins/nextgen-gallery/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-2135/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
