CVE-2026-135654: Lightbox with PhotoSwipe <= 5.18.0 - Unauthenticated Stored Cross-Site Scripting via Comment Link 'title' Attribute
The Lightbox with PhotoSwipe plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'comment' parameter in all versions up to, and including, 5.18.0 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Successful exploitation requires an administrator to approve the attacker's comment at least once, which is the default WordPress behavior for first-time commenters; after that initial approval, no further administrative action is needed and the payload fires for any visitor who opens the lightbox on the affected post.
Affected Software
Event History
Frequently Asked Questions
Which installations are affected?
dFactory Lightbox with PhotoSwipe for WordPress is affected in all versions up to and including 5.18.0.
Does an attacker need a WordPress account or other authentication?
No. An unauthenticated attacker can submit the malicious comment parameter, but the comment must be approved by an administrator at least once before exploitation succeeds.
Are sites using the default comment-approval behavior exposed?
Yes. Under the default WordPress behavior, a first-time commenter's comment requires administrator approval. Once that commenter has had a comment approved, subsequent malicious comments do not require further administrative action.
When does the injected script run?
The payload executes for any visitor who opens the lightbox on the affected post containing the injected content.