Skip to main content
Vulnerability Database/CVE-2026-103897

CVE-2026-103897: WordPress Lightbox Plugin XSS Vulnerability

CVE-2026-103897 is a stored cross-site scripting flaw in the Responsive Lightbox & Gallery plugin for WordPress that lets authenticated attackers inject malicious scripts. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-103897 Overview

The Responsive Lightbox & Gallery plugin for WordPress contains a stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in the comment parameter. The flaw affects all versions up to and including 2.7.9. Insufficient input sanitization and output escaping allow authenticated attackers with editor-level access or higher to inject arbitrary web scripts into pages. Injected scripts execute when a visitor opens an affected lightbox image.

Exploitation requires the plugin's Comments lightbox setting to be enabled, which is disabled by default. A moderator must approve the malicious comment, and a visitor must click the affected image to trigger execution.

Critical Impact

Authenticated editors can store JavaScript that executes in the browser context of any visitor viewing a lightbox-enabled image with approved comments.

Affected Products

  • Responsive Lightbox & Gallery plugin for WordPress — all versions through 2.7.9
  • WordPress installations with the plugin's Comments lightbox setting enabled
  • Sites with editor-level or administrator accounts able to author content

Discovery Timeline

  • 2026-10-10 - CVE-2026-103897 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-103897

Vulnerability Analysis

The vulnerability resides in the frontend rendering path of the Responsive Lightbox & Gallery plugin. Comment content submitted through the plugin's lightbox comment feature is stored and later rendered without sufficient sanitization or output encoding. When a visitor opens the lightbox for an image that has approved comments, the stored payload is injected into the Document Object Model (DOM) and executed in the visitor's browser.

Because the payload runs under the site's origin, an attacker can perform actions on behalf of the viewing user, including session-scoped requests to WordPress endpoints. The vulnerability requires authenticated access at the editor level or above, moderator approval of the comment, and the non-default Comments lightbox setting to be enabled, which limits the realistic attack surface.

Root Cause

The root cause is missing input sanitization on the comment parameter and missing output escaping when the plugin injects comment content into the lightbox markup. Code references in the plugin's includes/class-frontend.php and the bundled glightbox.js show the rendering paths where unsanitized comment data is placed into the DOM. See the plugin source at Responsive Lightbox Frontend Class and GLightbox JS.

Attack Vector

An attacker with editor-level credentials submits a comment on a lightbox-enabled image containing an HTML or JavaScript payload. A moderator approves the comment, after which the stored payload persists in the WordPress database. When any site visitor clicks the affected image to open the lightbox, the browser renders and executes the injected script.

The vulnerability describes the injection mechanism in prose only; no public proof-of-concept code is referenced in the advisory. Technical details are available in the Wordfence CVE Vulnerability Report.

Detection Methods for CVE-2026-103897

Indicators of Compromise

  • Approved comments containing <script>, onerror=, onload=, or inline event handlers stored in the WordPress wp_comments table
  • Unexpected outbound requests from visitor browsers to attacker-controlled domains after loading image galleries
  • New or modified administrator accounts created shortly after high-traffic access to gallery pages

Detection Strategies

  • Audit the wp_comments table for HTML tags and JavaScript event attributes in comment bodies associated with image attachments
  • Review the Responsive Lightbox plugin settings and confirm whether the Comments lightbox feature has been enabled unexpectedly
  • Monitor web server logs for POST requests to comment submission endpoints originating from editor-level accounts

Monitoring Recommendations

  • Enable WordPress audit logging for comment approval actions and plugin configuration changes
  • Deploy Content Security Policy (CSP) headers to detect and block inline script execution attempts
  • Alert on new editor or administrator role assignments and on changes to the plugin's comment settings

How to Mitigate CVE-2026-103897

Immediate Actions Required

  • Upgrade the Responsive Lightbox & Gallery plugin to a version released after 2.7.9 that contains the fix referenced in Changeset 3694843 and Changeset 3729072
  • Disable the plugin's Comments lightbox setting if upgrading is not immediately possible
  • Review all approved comments on lightbox-enabled image attachments and remove any containing script content
  • Audit editor-level and administrator accounts for unauthorized access

Patch Information

The plugin maintainers addressed the issue in the WordPress plugin repository. Apply the fix included in Changeset 3694843. Confirm the installed version is later than 2.7.9 after upgrading.

Workarounds

  • Keep the Comments lightbox setting disabled, which is the shipping default configuration
  • Restrict editor-level account provisioning and require multi-factor authentication for all privileged WordPress roles
  • Train moderators to reject comments containing HTML or script syntax before approval
bash
# Verify installed plugin version via WP-CLI
wp plugin get responsive-lightbox --field=version

# Update the plugin to the latest patched release
wp plugin update responsive-lightbox

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.