# FancyBox for WordPress <= 3.4.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via Link data-* Attributes

- **ID:** WPSEC-2026-2800
- **Plugin:** FancyBox for WordPress (`fancybox-for-wordpress`), https://wordpress.org/plugins/fancybox-for-wordpress/
- **Affected versions:** from 3.1.0 before 3.4.3
- **Fixed in:** 3.4.3 (Update to 3.4.3 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-11-10)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/fancybox-for-wordpress
- **Fix released:** 2026-11-09
- **Published:** 2026-11-10
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2800/

## Description

The FancyBox for WordPress plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the data-* attributes of links opened in the lightbox in all versions up to, and including, 3.4.2. This is due to the bundled FancyBox library merging every data-* and data-options value of the clicked link into its settings, including markup templates such as baseTpl, errorTpl, btnTpl and video.tpl. It also accepts link-supplied sources with unsafe URL schemes and inserts link-supplied HTML, inline and Ajax content without sanitization. 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 lightbox.

## References

- https://wpsec.com/vuln/WPSEC-2026-2800/
- https://plugins.svn.wordpress.org/fancybox-for-wordpress/tags/3.4.3/
- https://wordpress.org/plugins/fancybox-for-wordpress/

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

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.
