Skip to main content

CVE-2025-3661: WordPress SB Chart Block XSS Vulnerability

CVE-2025-3661 is a stored XSS vulnerability in the SB Chart block plugin for WordPress affecting versions up to 1.2.6. Attackers with Contributor access can inject malicious scripts via the className parameter. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

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

CVE-2025-3661 is a Stored Cross-Site Scripting (XSS) vulnerability in the SB Chart block plugin for WordPress [CWE-79]. The flaw affects all plugin versions up to and including 1.2.6. It stems from insufficient input sanitization and output escaping on the className parameter. Authenticated users with Contributor-level access or higher can inject arbitrary JavaScript into pages. The injected script executes in the browser of any visitor who loads the affected page, enabling session theft, redirection, or administrative action abuse.

Critical Impact

Authenticated contributors can persist malicious JavaScript into published WordPress pages, enabling account takeover of higher-privileged users who view the content.

Affected Products

  • SB Chart block plugin for WordPress — all versions through 1.2.6
  • WordPress sites allowing Contributor-level or higher registration
  • Any WordPress installation with the vulnerable plugin active

Discovery Timeline

  • 2025-04-19 - CVE-2025-3661 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-3661

Vulnerability Analysis

The SB Chart block plugin exposes a Gutenberg block that accepts a className attribute for custom styling. The plugin writes this attribute directly into rendered page markup without applying WordPress sanitization helpers such as sanitize_html_class() or escaping functions like esc_attr(). A Contributor can craft a block whose className value contains quote-breakout sequences and inline event handlers. When an editor or administrator previews or publishes the content, the malicious payload is persisted. Every subsequent visitor executes attacker-controlled JavaScript in the context of the WordPress site origin.

Root Cause

The root cause is missing input validation and output encoding on the className parameter inside the block render callback, referenced at line 104 of sb-chart-block.php. WordPress treats contributor submissions as untrusted, but the plugin trusts the block attribute verbatim. This maps directly to CWE-79: Improper Neutralization of Input During Web Page Generation.

Attack Vector

An attacker registers or compromises a Contributor account. They insert an SB Chart block and supply a className attribute containing an XSS payload such as a broken-out attribute with an onmouseover or onerror handler. The attacker submits the post for review. When any user with elevated privileges opens, previews, or publishes the page, the stored payload fires in their browser session, enabling cookie theft, forced plugin installation, or administrator account creation. See the Wordfence Vulnerability Report for additional technical context.

// No verified public exploit code is available.
// Refer to the Wordfence advisory and plugin changeset for details.

Detection Methods for CVE-2025-3661

Indicators of Compromise

  • Post or page content containing SB Chart blocks with className values that include <script>, onerror=, onmouseover=, or quote-escape characters.
  • Unexpected outbound requests from editor or administrator browsers after viewing contributor-submitted content.
  • New administrator accounts, modified user roles, or unexpected plugin installations following contributor activity.

Detection Strategies

  • Audit the wp_posts table for stored block markup containing suspicious className attribute values.
  • Monitor WordPress audit logs for Contributor accounts submitting content that uses the SB Chart block.
  • Deploy a Web Application Firewall rule to flag block attributes containing HTML tag characters or JavaScript event handlers.

Monitoring Recommendations

  • Enable WordPress activity logging to track post submissions and role changes.
  • Alert on creation of new administrator users or privilege escalations shortly after contributor post reviews.
  • Review browser Content Security Policy (CSP) violation reports for inline script execution on content pages.

How to Mitigate CVE-2025-3661

Immediate Actions Required

  • Update the SB Chart block plugin to a version later than 1.2.6 that incorporates the fix from plugin changeset 3276462.
  • Audit existing posts for malicious className attributes and sanitize or remove affected content.
  • Review Contributor and Author accounts for unauthorized registrations and reset credentials where suspicious activity is observed.

Patch Information

The vendor released a fix tracked in WordPress plugin changeset 3276462. The patched release applies proper sanitization to the className attribute. See the plugin developer page for the current version. Administrators should apply the update through the WordPress admin dashboard or via WP-CLI.

Workarounds

  • Deactivate the SB Chart block plugin until the patched version is deployed.
  • Restrict Contributor-level registration and require administrator approval for new accounts.
  • Enforce a Content Security Policy that blocks inline script execution on front-end pages.
bash
# Update the plugin using WP-CLI
wp plugin update sb-chart-block

# Or deactivate until patched
wp plugin deactivate sb-chart-block

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.