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

CVE-2025-10139: WP BookWidgets Plugin XSS Vulnerability

CVE-2025-10139 is a stored XSS vulnerability in WP BookWidgets plugin for WordPress that lets authenticated attackers inject malicious scripts. This article covers the technical details, affected versions, security 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-10139 Overview

The WP BookWidgets plugin for WordPress contains a Stored Cross-Site Scripting (XSS) vulnerability in the bw_link shortcode. The flaw affects all versions up to and including 0.9. Insufficient input sanitization and output escaping on user-supplied shortcode attributes allow authenticated attackers with contributor-level access to inject arbitrary web scripts. Injected scripts execute in the browser of any user who views the affected page. This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated contributors can persist arbitrary JavaScript that executes against site visitors and administrators, enabling session theft, account takeover, and further compromise of the WordPress site.

Affected Products

  • WP BookWidgets plugin for WordPress, all versions up to and including 0.9
  • WordPress sites permitting contributor-level or higher accounts
  • Any page rendering the vulnerable bw_link shortcode

Discovery Timeline

  • 2025-10-15 - CVE-2025-10139 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-10139

Vulnerability Analysis

The WP BookWidgets plugin exposes a bw_link shortcode used to render embedded links inside WordPress posts and pages. The shortcode handler accepts user-supplied attributes and outputs them into the page HTML without adequate sanitization or escaping. An authenticated user with the WordPress contributor role or higher can craft shortcode attributes containing JavaScript payloads. When the post is rendered, the payload executes in the browser context of any visitor. Because contributors can save posts pending review, editors and administrators who preview or moderate content become likely execution targets.

Root Cause

The root cause is missing input validation and missing output encoding on shortcode attributes passed to the bw_link handler. WordPress provides helpers such as esc_attr(), esc_url(), and wp_kses() for sanitizing attribute values before echoing them into HTML. The vulnerable code path in wp-bookwidgets.php does not apply these controls to the affected attributes, so raw attacker-controlled input is written directly to the rendered markup. Refer to the WordPress Plugin Code Snippet for the pre-patch implementation.

Attack Vector

The attack is network-based and requires authenticated access at contributor privilege or above. An attacker submits a post containing a bw_link shortcode whose attribute values include a JavaScript payload, such as an event handler or embedded script. Once the post is viewed, previewed, or moderated by another user, the payload executes with that user's privileges. The scope changes because script execution occurs in the browser session of the victim, enabling session hijacking, forced administrative actions via authenticated requests, and cross-user redirection. See the Wordfence Vulnerability Report for additional advisory context.

Detection Methods for CVE-2025-10139

Indicators of Compromise

  • Post or page content containing bw_link shortcodes with attributes holding <script> tags, javascript: URIs, or DOM event handlers such as onerror and onload
  • Unexpected outbound requests from visitor browsers to attacker-controlled domains after loading pages using the plugin
  • New or modified administrator accounts created shortly after a contributor published or updated content
  • Browser console errors or content security policy violations tied to pages rendering bw_link

Detection Strategies

  • Audit the WordPress wp_posts table for post_content entries containing bw_link shortcodes and inspect attribute values for HTML or script characters
  • Enable request logging on the web server and search access logs for suspicious parameter values submitted by contributor accounts
  • Deploy a web application firewall rule that flags shortcode attribute values containing script keywords, angle brackets, or on*= event handlers

Monitoring Recommendations

  • Monitor creation and editing activity by contributor-level accounts for anomalous shortcode usage
  • Alert on privilege changes, plugin installations, and configuration edits performed by non-administrator sessions
  • Track outbound HTTP requests from administrative browser sessions using endpoint telemetry and browser isolation tooling

How to Mitigate CVE-2025-10139

Immediate Actions Required

  • Update the WP BookWidgets plugin to a version later than 0.9 that includes the fix committed in WordPress Changeset 3380322
  • Review existing posts and pages for malicious bw_link shortcode attributes and remove or sanitize any suspicious entries
  • Rotate credentials and invalidate active sessions for administrator accounts that may have viewed affected content
  • Restrict contributor account creation and audit existing low-privilege accounts for anomalous activity

Patch Information

The vendor released a fix documented in WordPress Changeset 3380322 on the WP BookWidgets plugin page. Update the plugin from the WordPress admin dashboard or by replacing the plugin directory contents with the patched release. Confirm the installed version reports higher than 0.9 after the update.

Workarounds

  • Temporarily deactivate the WP BookWidgets plugin until the patched version is deployed
  • Remove the bw_link shortcode from published posts and disable rendering of the shortcode through a custom must-use plugin
  • Restrict the contributor role from publishing shortcode-bearing content by adjusting role capabilities with a role management plugin
  • Deploy a Content Security Policy that blocks inline script execution to limit the impact of stored XSS payloads
bash
# Example: disable the vulnerable shortcode via a mu-plugin until patched
# Save as wp-content/mu-plugins/disable-bw-link.php
<?php
add_action('init', function () {
    if (shortcode_exists('bw_link')) {
        remove_shortcode('bw_link');
    }
}, 20);

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.