Skip to main content

CVE-2025-4589: Bon Toolkit WordPress Plugin XSS Vulnerability

CVE-2025-4589 is a stored cross-site scripting flaw in the Bon Toolkit WordPress plugin affecting the bt-map shortcode. Attackers with contributor access can inject malicious scripts. This article covers technical details, affected versions, impact, and mitigation steps.

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-4589 Overview

CVE-2025-4589 is a Stored Cross-Site Scripting (XSS) vulnerability in the Bon Toolkit plugin for WordPress. The flaw affects all versions up to and including 1.3.2. The plugin's bt-map shortcode fails to sanitize user-supplied attributes and does not escape output properly. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any visitor who views the affected page. The vulnerability is categorized 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, administrative action hijacking, and client-side redirection attacks against site visitors and administrators.

Affected Products

  • Bon Toolkit plugin for WordPress — all versions through 1.3.2
  • WordPress sites exposing the vulnerable bt-map shortcode
  • Multi-author WordPress deployments granting contributor or higher roles

Discovery Timeline

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

Technical Details for CVE-2025-4589

Vulnerability Analysis

The vulnerability resides in the Bon Toolkit plugin's shortcode handler for bt-map. The shortcode accepts user-supplied attributes intended to control map rendering. The plugin passes those attributes into generated HTML without sufficient sanitization or escaping. An authenticated attacker with contributor privileges can craft a post containing a malicious bt-map shortcode. When any user renders the resulting page, the attacker's JavaScript executes in that user's browser session.

Exploitation yields session cookie theft, cross-site request forgery against authenticated administrators, forced redirection to attacker-controlled infrastructure, and arbitrary DOM manipulation. The scope change in the vector indicates the injected script can affect resources beyond the vulnerable component, such as the authenticated administrator's session when they preview or publish the submitted content.

Root Cause

The root cause is missing input sanitization and output escaping in the shortcode processing logic found in includes/shortcodes.php. WordPress provides helper functions such as esc_attr(), esc_html(), and wp_kses() for safely handling shortcode attributes, but the Bon Toolkit implementation does not apply them to the bt-map attribute values before rendering. See the WordPress Plugin Shortcode Code for the vulnerable code path.

Attack Vector

The attack requires an authenticated account with contributor-level permissions or above. The attacker submits content containing a malicious bt-map shortcode with crafted attribute values holding JavaScript payloads. Once an editor, administrator, or site visitor renders the page, the script executes with the full privileges of that user's session. No user interaction beyond page navigation is required for execution.

See the Wordfence Vulnerability Report for additional technical details.

Detection Methods for CVE-2025-4589

Indicators of Compromise

  • Posts or pages submitted by contributor-level accounts containing [bt-map] shortcodes with suspicious attribute values holding <script>, javascript:, or event-handler payloads.
  • Unexpected outbound requests from administrator browsers to unfamiliar domains after viewing content pending review.
  • New administrative users, modified plugin settings, or altered theme files following contributor content submissions.

Detection Strategies

  • Query the WordPress wp_posts table for post_content containing bt-map combined with HTML or JavaScript metacharacters in attribute positions.
  • Review web server access logs for POST requests to /wp-admin/post.php or /wp-admin/admin-ajax.php from contributor accounts that correlate with shortcode submissions.
  • Monitor Content Security Policy (CSP) violation reports for inline script execution on pages rendered from the plugin.

Monitoring Recommendations

  • Alert on contributor or author accounts submitting content that references the bt-map shortcode until the plugin is patched or removed.
  • Track administrator session activity following preview or publish actions on contributor-submitted drafts.
  • Centralize WordPress audit logs and correlate role changes, plugin modifications, and user creation events with recent content submissions.

How to Mitigate CVE-2025-4589

Immediate Actions Required

  • Deactivate the Bon Toolkit plugin on affected WordPress installations until a vendor-supplied fix is confirmed and deployed.
  • Audit all existing posts and pages for bt-map shortcode usage and remove instances submitted by non-trusted accounts.
  • Rotate credentials and session tokens for any administrator who may have rendered contributor-submitted content containing the shortcode.

Patch Information

At the time of NVD publication, all versions through 1.3.2 are affected. Monitor the Wordfence Vulnerability Report and the plugin repository for a patched release. Apply the fixed version immediately once published and verify that includes/shortcodes.php applies esc_attr() or equivalent escaping to shortcode attributes.

Workarounds

  • Restrict contributor and author role assignments to vetted users only, reducing the pool of accounts that can submit the vulnerable shortcode.
  • Deploy a web application firewall rule that blocks POST requests to WordPress editing endpoints containing [bt-map combined with script-related keywords.
  • Enforce a strict Content Security Policy that disallows inline script execution and restricts script sources to trusted origins.
bash
# Disable the Bon Toolkit plugin via WP-CLI pending a patched release
wp plugin deactivate bon-toolkit

# Identify posts containing the vulnerable shortcode for manual review
wp db query "SELECT ID, post_author, post_status FROM wp_posts \
  WHERE post_content LIKE '%[bt-map%';"

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.