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-100158 Overview
CVE-2026-100158 is a Stored Cross-Site Scripting (XSS) vulnerability in the SQL Chart Builder plugin for WordPress [CWE-79]. The flaw affects all plugin versions up to and including 3.0.6. It stems from insufficient input sanitization and output escaping on the X-axis column value rendered from $wpdb->get_results() output. Authenticated attackers with Subscriber-level access can inject arbitrary JavaScript that executes when any visitor loads a page containing a vulnerable chart.
Critical Impact
A Subscriber can store a JavaScript payload in their WordPress profile display_name field. When an administrator publishes a chart whose SQL query exposes that column, the payload executes in every viewer's browser, enabling session theft, forced actions, and admin account takeover.
Affected Products
- SQL Chart Builder plugin for WordPress — all versions <= 3.0.6
- WordPress sites allowing user registration at Subscriber level or above
- Sites with published charts rendering user-controllable columns such as wp_users.display_name
Discovery Timeline
- 2026-10-16 - CVE-2026-100158 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-100158
Vulnerability Analysis
The SQL Chart Builder plugin renders chart data retrieved from arbitrary administrator-defined SQL queries. The plugin iterates over result rows via $wpdb->get_results() and emits the X-axis column value directly into the chart markup without applying esc_html() or esc_attr(). Any string that originated from a lower-privileged user and that happens to appear in the SQL result set is written to the page as-is.
The affected code paths are visible in the plugin source at functions.php lines 579, 820, 1019, 1093, and 1101. These locations handle the construction of chart labels and tooltip data from query results. Because escaping is missing on the server side, the browser parses stored HTML and script content when the chart renders.
The scope-change rating reflects that a Subscriber-controlled payload executes in the browser context of other users, including administrators who may trigger privileged actions such as plugin installation or user creation.
Root Cause
The root cause is a missing output-encoding step on data returned from $wpdb->get_results(). The plugin treats SQL result columns as trusted because the SQL query itself is defined by an administrator. This assumption breaks when the query selects columns such as wp_users.display_name, user_url, or description, which any registered user can modify through /wp-admin/profile.php.
Attack Vector
- An administrator publishes a chart whose SQL query returns a user-controllable column.
- A Subscriber navigates to /wp-admin/profile.php and sets their display name to a payload such as <img src=x onerror=...>.
- The payload is stored in the WordPress database.
- When any user, including an authenticated administrator, loads the page hosting the chart, the stored script executes in their browser session.
See the Wordfence Vulnerability Report for additional technical context.
Detection Methods for CVE-2026-100158
Indicators of Compromise
- Values in wp_users.display_name, user_url, or user_description containing HTML tags, <script> blocks, or event handlers such as onerror=, onload=, or onclick=.
- Unexpected outbound requests from administrator browsers to external hosts shortly after visiting pages containing SQL Chart Builder charts.
- New administrator accounts, plugin installs, or option changes correlated with admin sessions that rendered a vulnerable chart.
Detection Strategies
- Query the WordPress database for suspicious characters in user-editable profile fields: SELECT ID, display_name FROM wp_users WHERE display_name REGEXP '<|>|script|onerror';.
- Review all published pages and posts for shortcodes or blocks referencing sql-chart-builder and inspect the backing SQL queries for columns sourced from wp_users.
- Inspect browser Content Security Policy violation reports for inline script executions on pages containing charts.
Monitoring Recommendations
- Enable WordPress audit logging for profile updates, especially display_name changes from Subscriber accounts.
- Monitor web server access logs for repeated POST requests to /wp-admin/profile.php from newly registered accounts.
- Alert on administrator sessions performing privileged actions immediately after rendering a page that embeds a SQL Chart Builder chart.
How to Mitigate CVE-2026-100158
Immediate Actions Required
- Update the SQL Chart Builder plugin to a version newer than 3.0.6 once released, per the fix in WordPress plugin changeset 3725657.
- Audit all existing charts and remove or rewrite any SQL query that selects user-controllable columns such as display_name, user_url, or description.
- Sanitize existing wp_users profile fields and reset any values that contain HTML or script content.
Patch Information
The vendor committed a fix in changeset 3725657 addressing the unescaped output in functions.php. Administrators should upgrade to the first plugin release that incorporates this changeset. Review the vulnerable code locations at the WordPress SQL Chart Builder source to confirm the fix is present in your deployed version.
Workarounds
- Disable the SQL Chart Builder plugin until a patched release is installed.
- Restrict user registration or require administrator approval for new accounts to limit the attacker pool.
- Rewrite chart SQL queries to exclude user-modifiable columns, or wrap values with server-side formatting that strips HTML before storage.
- Deploy a Content Security Policy that blocks inline script execution on pages that render charts.
# Temporarily disable the plugin via WP-CLI until a patched version is installed
wp plugin deactivate sql-chart-builder
# Identify user accounts with suspicious profile content
wp db query "SELECT ID, user_login, display_name FROM wp_users \
WHERE display_name REGEXP '<|>|script|onerror|onload';"
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

