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

CVE-2026-108487: Books Gallery WordPress Plugin XSS Flaw

CVE-2026-108487 is a stored XSS vulnerability in the Books Gallery WordPress plugin that enables attackers to inject malicious scripts. This article covers technical details, affected versions through 4.8.4, 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-108487 Overview

CVE-2026-108487 is a stored Cross-Site Scripting (XSS) vulnerability in the Hossni Mubarak Books Gallery WordPress plugin (wp-books-gallery). The flaw stems from improper neutralization of user-supplied input during web page generation [CWE-79]. Authenticated attackers with low privileges can inject malicious scripts that persist in the application and execute in the browsers of other users, including site administrators. The vulnerability affects all versions of the Books Gallery plugin up to and including 4.8.4.

Critical Impact

Authenticated users can inject persistent JavaScript into WordPress pages, enabling session hijacking, administrative account takeover, and redirection of site visitors to attacker-controlled infrastructure.

Affected Products

  • Hossni Mubarak Books Gallery plugin for WordPress
  • Plugin slug: wp-books-gallery
  • Versions through 4.8.4

Discovery Timeline

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

Technical Details for CVE-2026-108487

Vulnerability Analysis

The Books Gallery plugin fails to sanitize and escape input supplied through plugin-managed fields before rendering it in generated web pages. An authenticated attacker submits crafted input containing JavaScript payloads. The server stores the payload and later renders it without encoding, causing the script to execute whenever another user views the affected page.

Stored XSS in a WordPress plugin context typically allows an attacker to steal authentication cookies, perform actions on behalf of a logged-in administrator, modify site content, or pivot to further compromise. User interaction is required to trigger the payload, and the scope change (S:C) indicates the injected script can affect resources beyond the vulnerable component, such as other users browsing the WordPress front end.

Root Cause

The plugin does not apply WordPress sanitization helpers such as wp_kses(), sanitize_text_field(), or esc_html() to user-controlled input before persistence and output. Content submitted through plugin forms is written to the database as-is and echoed back into HTML contexts without encoding, violating the output-encoding principle defined in [CWE-79].

Attack Vector

The attack vector is network-based and requires low privileges plus user interaction. An attacker with a Contributor, Author, or similar role submits a book entry or metadata containing a crafted <script> or event-handler payload. When an administrator, editor, or visitor loads the page rendering that content, the browser executes the stored JavaScript in the context of the WordPress site origin. See the Patchstack Vulnerability Report for additional technical details.

Detection Methods for CVE-2026-108487

Indicators of Compromise

  • Book entries or plugin-managed fields containing <script>, onerror=, onload=, or javascript: strings in the WordPress database
  • Unexpected outbound requests from administrator browsers to unknown domains shortly after loading pages rendered by the Books Gallery plugin
  • New administrator accounts, modified user roles, or unexpected plugin installations following access to plugin-rendered pages

Detection Strategies

  • Query the wp_posts and plugin-specific tables for HTML tags or JavaScript event handlers in Books Gallery content
  • Monitor web server access logs for POST requests to wp-admin/admin.php or plugin endpoints containing encoded script payloads
  • Deploy a Content Security Policy (CSP) in report-only mode to surface inline script execution originating from plugin pages

Monitoring Recommendations

  • Alert on WordPress audit log events showing low-privilege users editing Books Gallery entries
  • Track browser telemetry for anomalous DOM modifications or cookie access on pages generated by the plugin
  • Correlate administrative session activity with recently viewed plugin content to identify potential cookie theft chains

How to Mitigate CVE-2026-108487

Immediate Actions Required

  • Identify all WordPress sites running the wp-books-gallery plugin at version 4.8.4 or earlier
  • Restrict or temporarily disable low-privilege roles that can submit content to the plugin until a patched release is applied
  • Review existing Books Gallery entries for stored script payloads and purge malicious content from the database

Patch Information

At the time of publication, no fixed version is listed in the NVD record. Monitor the Patchstack Vulnerability Report and the plugin's WordPress.org page for a release that supersedes 4.8.4, and apply it as soon as it becomes available.

Workarounds

  • Deactivate the Books Gallery plugin until a patched version is released
  • Enforce a strict Content Security Policy that blocks inline scripts and restricts allowed script sources
  • Deploy a Web Application Firewall rule that blocks requests containing script tags or JavaScript event handlers targeting plugin endpoints
  • Rotate administrator credentials and invalidate active sessions if stored payloads are discovered
bash
# Example WP-CLI command to deactivate the vulnerable plugin
wp plugin deactivate wp-books-gallery --all

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.