# Photo Gallery, Sliders, Proofing and Themes <= 4.6.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Basic Slideshow 'data-slick' Attribute

- **ID:** WPSEC-2026-4390
- **Plugin:** Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery (`nextgen-gallery`), https://wordpress.org/plugins/nextgen-gallery/
- **Affected versions:** from 3.0.9 before 4.6.2
- **Fixed in:** 4.6.2 (Update to 4.6.2 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/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-4390/

## Description

The NextGEN Gallery plugin for WordPress is vulnerable to DOM-based Stored Cross-Site Scripting via the basic slideshow script in versions 3.0.9 up to, and including, 4.6.1. This is due to the script initialising the Slick slider on any element with the slideshow classes (and, in later versions, the displayed gallery's ID), including markup that is not part of the gallery. Slick reads its options from that element's data-slick attribute and builds its arrow options as HTML with jQuery. This makes it possible for authenticated attackers, with contributor-level access and above, to place an element with those classes and a crafted data-slick attribute in a post that also shows a basic slideshow and inject arbitrary web scripts that execute whenever a user visits the page.

## References

- https://wpsec.com/vuln/WPSEC-2026-4390/
- 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-4390/

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.
