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-23909 Overview
CVE-2025-23909 is a stored cross-site scripting (XSS) vulnerability in the Common Ninja Compare Ninja WordPress plugin (compare-ninja-comparison-tables). The flaw affects all plugin versions up to and including 2.1.0. Authenticated users with low-level privileges can inject malicious scripts that persist in comparison tables and execute in the browsers of users who view the affected pages. The vulnerability is tracked under CWE-79 for improper neutralization of input during web page generation.
Critical Impact
Attackers with low-privilege WordPress accounts can store malicious JavaScript that executes in administrator or visitor browsers, enabling session theft, forced actions, and content redirection.
Affected Products
- Common Ninja Compare Ninja (compare-ninja-comparison-tables) plugin for WordPress
- All versions from initial release through 2.1.0
- WordPress sites running the vulnerable plugin with user accounts able to configure comparison tables
Discovery Timeline
- 2025-01-16 - CVE-2025-23909 published to the National Vulnerability Database
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2025-23909
Vulnerability Analysis
The vulnerability is a stored XSS flaw in the Compare Ninja plugin, which renders comparison tables inside WordPress pages and posts. Input supplied through the plugin's table configuration interface is not properly neutralized before being written back into generated HTML output. An authenticated user with permission to create or edit comparison tables can inject JavaScript payloads that are stored in the WordPress database. The payloads execute whenever any user, including administrators, loads a page that renders the affected table.
Exploitation requires user interaction and some level of authenticated access, but privileges needed are limited. Because the scripted content executes within the context of the WordPress site, it can read cookies, invoke privileged API calls, and modify page content served to visitors.
Root Cause
The plugin fails to sanitize or encode user-supplied content before echoing it into page HTML. Standard WordPress helpers such as esc_html(), esc_attr(), and wp_kses_post() are not applied consistently to comparison table fields, allowing raw <script> tags and event handlers to persist in rendered output.
Attack Vector
The attack vector is network-based through the WordPress admin interface. A contributor-level or similar authenticated account creates or modifies a comparison table and embeds JavaScript into one of the editable fields. When an administrator or site visitor loads the page containing that table, the browser parses and executes the injected script in the origin of the WordPress site. See the Patchstack vulnerability report for additional technical context.
No verified proof-of-concept exploit code is published for this issue. The vulnerability class is well understood, and the mechanism follows the standard pattern of unsanitized plugin input reflected to viewers.
Detection Methods for CVE-2025-23909
Indicators of Compromise
- Comparison table records in wp_options or plugin-specific tables containing <script>, javascript:, or event handler attributes such as onerror= and onload=.
- Unexpected outbound requests from administrator browsers to attacker-controlled domains shortly after loading pages that render Compare Ninja tables.
- New or modified administrator accounts following page views by privileged users on affected posts.
Detection Strategies
- Audit WordPress database content for Compare Ninja records containing HTML or JavaScript markup rather than plain-text table values.
- Review web server access logs for POST requests to the Compare Ninja plugin endpoints originating from low-privilege accounts.
- Deploy a web application firewall rule that flags script-like content submitted to WordPress admin AJAX endpoints associated with the plugin.
Monitoring Recommendations
- Monitor WordPress audit logs for comparison table creation and modification events, correlated with the submitting user role.
- Alert on administrator sessions that execute unusual XHR or fetch calls to WordPress REST endpoints such as /wp-json/wp/v2/users immediately after loading plugin-rendered pages.
- Track plugin version inventory across managed WordPress sites and alert when Compare Ninja remains at version 2.1.0 or earlier.
How to Mitigate CVE-2025-23909
Immediate Actions Required
- Update the Compare Ninja plugin to a version later than 2.1.0 as soon as the vendor publishes a patched release.
- Restrict the WordPress roles permitted to create or edit comparison tables to trusted administrators only.
- Review all existing Compare Ninja tables and remove any content that contains HTML or scripting syntax.
- Rotate credentials and session tokens for administrator accounts that visited pages containing untrusted comparison tables.
Patch Information
At the time of publication, the Patchstack advisory lists all versions through 2.1.0 as affected. Site operators should monitor the plugin's WordPress.org listing and the vendor advisory for an updated release that applies proper output encoding to comparison table fields.
Workarounds
- Deactivate and remove the Compare Ninja plugin until a patched version is available if comparison tables are not business-critical.
- Deploy a web application firewall rule that strips or blocks HTML tags in POST parameters submitted to the plugin's admin endpoints.
- Enforce a strict Content Security Policy that disallows inline scripts, reducing the impact of injected payloads.
- Limit contributor and author account creation and require strong authentication to reduce the pool of accounts that can submit malicious table content.
# Example WordPress CLI commands to inventory and disable the vulnerable plugin
wp plugin list --name=compare-ninja-comparison-tables --fields=name,status,version
wp plugin deactivate compare-ninja-comparison-tables
wp plugin delete compare-ninja-comparison-tables
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

