# Photo Gallery, Sliders, Proofing and Themes <= 4.6.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shutter Lightbox Image Links

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

## Description

The NextGEN Gallery plugin for WordPress is vulnerable to DOM-based Stored Cross-Site Scripting via image links opened in the Shutter and Shutter Reloaded lightboxes in all versions up to, and including, 4.6.1. This is due to the lightbox scripts accepting links with non-web schemes such as mailto:, whose URL keeps literal double quotes, and concatenating the link URL unescaped into an img src attribute assigned through innerHTML. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user opens the crafted link in the lightbox. Exploitation requires the Shutter or Shutter Reloaded lightbox to be selected.

## References

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

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

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.
