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-12649 Overview
CVE-2025-12649 is a Stored Cross-Site Scripting (XSS) vulnerability in the SortTable Post plugin for WordPress. The flaw affects all versions up to and including 4.2. It resides in the sorttablepost shortcode, where the id parameter accepts user-supplied input without sufficient sanitization or output escaping. Authenticated users with contributor-level access or above can inject arbitrary JavaScript into pages. The injected payload executes when a visitor triggers the required mouse interaction on an affected page. The vulnerability is tracked under [CWE-79] (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Contributor-level WordPress accounts can store JavaScript payloads that execute in the browsers of visitors interacting with affected pages, enabling session theft, account takeover, or further client-side attacks.
Affected Products
- SortTable Post plugin for WordPress — all versions ≤ 4.2
- WordPress sites with contributor-or-above user registration enabled
- Any public page rendering the sorttablepost shortcode
Discovery Timeline
- 2025-11-27 - CVE-2025-12649 published to NVD
- 2026-10-18 - Last updated in NVD database
Technical Details for CVE-2025-12649
Vulnerability Analysis
The SortTable Post plugin registers a sorttablepost shortcode that accepts an id attribute. The plugin consumes this attribute and reflects it into generated HTML output without applying WordPress escaping functions such as esc_attr() or esc_html(). An authenticated contributor can embed the shortcode in a post or page with a crafted id value containing HTML attribute-breaking characters and JavaScript. When WordPress renders the post, the injected markup becomes part of the DOM and executes in the context of each visitor's browser session.
Because the shortcode is persisted inside post content, the payload remains active until an administrator removes or edits the post. The attack requires mouse interaction on the rendered element, which places the vulnerability in the stored, user-interaction-dependent XSS category. Successful exploitation runs in the origin of the WordPress site, enabling cookie theft, forced actions through administrative sessions, and client-side redirection.
Root Cause
The root cause is insufficient input sanitization and output escaping of shortcode attributes in sorttablepost.php. The plugin trusts attributes supplied by authors and inserts them directly into HTML. Refer to the WordPress Plugin Source Code for the vulnerable rendering logic.
Attack Vector
An attacker authenticates to WordPress with contributor-level privileges or higher. The attacker creates or edits a post containing the sorttablepost shortcode with a malicious id attribute, for example a payload closing the preceding attribute and introducing an inline event handler. After publication or preview, any user accessing the page who performs the required mouse interaction triggers execution of the stored script in their browser. Administrators who review the post for moderation are high-value targets, since their sessions can be hijacked to escalate to full site compromise.
Detection Methods for CVE-2025-12649
Indicators of Compromise
- Posts or pages containing [sorttablepost id=...] shortcodes with HTML-breaking characters such as ", >, <script, or on*= handlers inside the id attribute.
- Unexpected inline JavaScript, event handlers, or external script src references in rendered post HTML.
- Contributor or author accounts that recently created content invoking the sorttablepost shortcode.
- Outbound requests from client browsers to unfamiliar domains originating from WordPress-hosted pages.
Detection Strategies
- Query the wp_posts table for post_content LIKE '%[sorttablepost%' and inspect each match for suspicious id attribute content.
- Deploy a web application firewall rule that inspects POST requests to post.php and admin-ajax.php for shortcode attributes containing script tags or event handlers.
- Enable WordPress audit logging to capture post creation and update events performed by contributor and author accounts.
Monitoring Recommendations
- Monitor WordPress authentication logs for new or dormant contributor accounts that begin publishing content.
- Alert on HTTP responses from WordPress endpoints containing shortcode-rendered output with inline event handlers.
- Track browser-side Content Security Policy (CSP) violation reports for inline script execution on pages that render the plugin.
How to Mitigate CVE-2025-12649
Immediate Actions Required
- Update the SortTable Post plugin to a version later than 4.2 once the vendor publishes a fix, or deactivate and remove the plugin.
- Audit all existing posts for the sorttablepost shortcode and remove any instances containing suspicious id attribute values.
- Review and restrict contributor-level and author-level accounts, removing unused or untrusted users.
Patch Information
At the time of NVD publication, all versions up to and including 4.2 are affected. Monitor the Wordfence advisory and the plugin's WordPress.org page for a patched release and apply it immediately when available.
Workarounds
- Deactivate the SortTable Post plugin until a patched release is published.
- Restrict post publication to editor-level or administrator-level accounts and route lower-privilege content through moderation.
- Deploy a Content Security Policy that disallows inline scripts and unknown external script sources to limit XSS payload execution.
- Add a WAF rule blocking shortcode attributes containing <, >, ", or on event handler prefixes in authenticated POST bodies.
# Temporary mitigation: disable the plugin via WP-CLI
wp plugin deactivate sorttable-post
wp plugin delete sorttable-post
# Identify posts referencing the vulnerable shortcode
wp db query "SELECT ID, post_title, post_author FROM wp_posts \
WHERE post_content LIKE '%[sorttablepost%' AND post_status IN ('publish','draft','pending');"
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

