Skip to main content
Vulnerability Database/CVE-2025-11866

CVE-2025-11866: Photographers Galleries Plugin XSS Vulnerability

CVE-2025-11866 is a stored XSS flaw in the Photographers galleries WordPress plugin affecting versions up to 1.1.8. Attackers with contributor access can inject malicious scripts. This article covers technical details, impact, 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-2025-11866 Overview

The Photographers Galleries plugin for WordPress contains a Stored Cross-Site Scripting (XSS) vulnerability affecting all versions up to and including 1.1.8. The flaw resides in multiple shortcode attributes, including w, h, raw_css, and look, which the plugin inserts into HTML attributes and inline styles without proper sanitization or output escaping. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript that executes when any visitor views the affected page. The vulnerability is tracked under [CWE-79] (Improper Neutralization of Input During Web Page Generation).

Critical Impact

Authenticated contributors can inject persistent JavaScript into WordPress pages, enabling session theft, admin account takeover, and malicious redirects for all site visitors.

Affected Products

  • WordPress Photographers Galleries plugin versions up to and including 1.1.8
  • WordPress sites allowing contributor-level or higher user registration with this plugin installed
  • Multisite WordPress deployments using the Photographers Galleries plugin

Discovery Timeline

  • 2025-10-22 - CVE-2025-11866 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-11866

Vulnerability Analysis

The vulnerability is a Stored Cross-Site Scripting flaw in the Photographers Galleries plugin shortcode handler. The plugin accepts user-supplied values through shortcode attributes and embeds them directly into HTML attributes and inline CSS declarations. Because the plugin omits both input sanitization and output escaping, attacker-controlled values break out of the attribute context and execute as script.

An authenticated attacker with contributor privileges can embed a crafted shortcode in a post or page. When an administrator or visitor renders that content, the injected payload executes in their browser session. Because the payload is stored server-side, every subsequent view of the page triggers the script, enabling persistent compromise of site users.

Root Cause

The root cause is the absence of context-aware output encoding in the shortcodes.php file referenced in the WordPress Plugin Code Snippet. Shortcode attribute values such as w, h, raw_css, and look are interpolated into HTML attributes and inline style blocks without calls to esc_attr(), esc_html(), or equivalent WordPress escaping functions. The raw_css attribute is particularly dangerous because it is designed to accept CSS, which can be abused to inject expression() constructs in legacy browsers or break out into script contexts.

Attack Vector

An attacker first obtains contributor-level access, either through self-registration on sites that allow it or by compromising an existing low-privilege account. The attacker then creates a new post containing a Photographers Galleries shortcode with a malicious payload in one of the vulnerable attributes. When the post is previewed, published, or viewed by any user, the injected JavaScript executes with the viewing user's privileges. If an administrator views the content, the attacker can hijack the session, create new admin accounts, or deploy a web shell.

See the Wordfence Vulnerability Report for additional technical details on the exploitation path.

Detection Methods for CVE-2025-11866

Indicators of Compromise

  • Posts or pages authored by contributor-level users containing Photographers Galleries shortcodes with unusual attribute values such as onerror=, javascript:, or <script> fragments.
  • Unexpected administrator account creation, plugin installation, or theme modification following contributor activity.
  • Outbound requests from administrator browser sessions to attacker-controlled domains after viewing plugin-rendered pages.

Detection Strategies

  • Audit the wp_posts table for shortcode usage containing suspicious characters in w, h, raw_css, or look attributes.
  • Review web server access logs for POST requests to wp-admin/post.php or the REST API from contributor accounts followed by GET requests from admin IPs.
  • Deploy a Content Security Policy (CSP) in report-only mode to surface inline script violations originating from plugin-rendered pages.

Monitoring Recommendations

  • Monitor WordPress user role changes and new user creation events in real time.
  • Alert on modifications to wp_options, wp_users, and plugin files following contributor-authored content publication.
  • Track browser-side errors and CSP violation reports from the administrative dashboard.

How to Mitigate CVE-2025-11866

Immediate Actions Required

  • Deactivate the Photographers Galleries plugin until a patched version above 1.1.8 is released and verified.
  • Audit all posts and pages for existing Photographers Galleries shortcodes and remove any containing suspicious attribute values.
  • Review contributor and author accounts, revoking access for untrusted or unused accounts.
  • Rotate credentials and session cookies for administrators who may have viewed attacker-authored content.

Patch Information

As of the last NVD update on 2026-06-17, no fixed version has been published in the enriched data. Monitor the Wordfence Vulnerability Report and the plugin's official WordPress.org repository for a security release above version 1.1.8. Apply the update immediately upon availability.

Workarounds

  • Disable the Photographers Galleries plugin on all affected WordPress installations until patched.
  • Restrict user registration and remove contributor-level access from accounts that do not require it.
  • Deploy a Web Application Firewall (WAF) rule blocking shortcode attribute values containing <, >, onerror, onload, or javascript: strings.
  • Implement a strict Content Security Policy that disallows inline scripts and unauthorized script sources.
bash
# Disable the vulnerable plugin via WP-CLI
wp plugin deactivate photographers-galleries

# Audit posts for suspicious shortcode usage
wp db query "SELECT ID, post_title, post_author FROM wp_posts \
  WHERE post_content LIKE '%photographers%' \
  AND (post_content LIKE '%onerror%' \
       OR post_content LIKE '%<script%' \
       OR post_content LIKE '%javascript:%');"

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.