Lightbox with PhotoSwipe <= 5.18.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Image Caption Attributes
- ID
- WPSEC-2026-2849
- Plugin
- Lightbox with PhotoSwipe (lightbox-photoswipe)
- Affected
- from 5.9.0 before 5.19.0
- Remediation
- Update to 5.19.0 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weakness
- CWE-79
- Usage
- Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-11-12
- Attack surface
- Lightbox with PhotoSwipe on WPSec AttackSurface
- Fix released
- Published
Description
The Lightbox with PhotoSwipe plugin for WordPress is vulnerable to Stored Cross-Site Scripting via image caption sources (such as the data-lbwps-caption, data-lbwps-title, data-lbwps-description and data-lbwps-filename link attributes, the title and alt attributes, and figcaption content) in versions 5.9.0 up to, and including, 5.18.0. This is due to insufficient input sanitization in the frontend caption handling: a regular-expression filter removes only complete disallowed tags, so unterminated tags and, in later versions, anchor tags with javascript: URLs pass through, and the result is inserted into the lightbox as HTML. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts that execute when a user opens the image in the lightbox.
References
- https://wpsec.com/vuln/WPSEC-2026-2849/
- https://plugins.svn.wordpress.org/lightbox-photoswipe/tags/5.19.0/
- https://wordpress.org/plugins/lightbox-photoswipe/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS