CVE-2026-135654 in Lightbox with PhotoSwipe Plugininfo

Summary

by MITRE • 11/26/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The Lightbox with PhotoSwipe plugin for WordPress presents a significant security risk due to a stored cross-site scripting vulnerability affecting all versions up to 5.18.0. This flaw stems from insufficient input sanitization and output escaping mechanisms within the application code, specifically targeting the comment parameter associated with post interactions. The core technical deficiency lies in the failure of the plugin to properly validate or encode user-supplied data before storing it in the database and subsequently rendering it back into HTML content without adequate protection against script injection. This architectural oversight allows malicious actors to embed executable JavaScript payloads directly within the site's persistent storage, turning legitimate comment sections into vectors for code execution.

The operational impact of this vulnerability is severe because it enables unauthenticated attackers to compromise user sessions and potentially take control of administrative functions if they can trick an administrator or privileged user into interacting with the injected content. The exploitation chain begins when a malicious actor submits a crafted comment containing JavaScript code through the public-facing interface. Due to WordPress's default configuration, which requires administrators to approve comments from first-time contributors before they become visible on the site, there is a specific prerequisite for successful exploitation: an administrator must review and approve this initial malicious comment. Once approved, the payload becomes permanently stored in the database associated with that post.

After the initial approval phase, the vulnerability transitions into a persistent state where no further administrative intervention is required to maintain its effectiveness. Any subsequent visitor who accesses the affected page and triggers the lightbox feature will have their browser execute the injected scripts automatically. This behavior transforms the vulnerability from a transient issue into a long-term threat that can affect numerous users over time. The execution context of these scripts typically includes the privileges of the victim user, allowing attackers to steal session cookies, perform actions on behalf of the user, or redirect them to phishing sites designed to harvest credentials.

From an industry standards perspective, this vulnerability aligns with CWE-79, which classifies improper neutralization of input during web page generation as a common cause for cross-site scripting flaws. The attack vector corresponds to ATT&CK technique T1059.007, specifically JavaScript execution within the browser environment, and leverages social engineering principles inherent in the approval workflow described by MITRE ATT&CK sub-techniques related to initial access via trusted software supply chain or user interaction. Understanding these mappings helps security teams categorize the risk accurately and prioritize remediation efforts based on established threat intelligence frameworks rather than relying solely on generic severity scores.

To mitigate this vulnerability, site administrators should immediately update the Lightbox with PhotoSwipe plugin to a version newer than 5.18.0 where the input sanitization and output escaping issues have been resolved by the developers. In cases where updating is not immediately feasible due to compatibility constraints or other operational restrictions, implementing web application firewall rules can provide temporary protection by filtering out malicious payloads in HTTP requests targeting the comment parameter. Additionally, enabling strict Content Security Policy headers on the WordPress site can help mitigate the impact of any successfully injected scripts by restricting the sources from which JavaScript code is allowed to execute, thereby reducing the effectiveness of client-side attacks even if they manage to bypass other defenses.

Responsible

Wordfence

Reservation

11/23/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00540

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!