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-2024-9357 Overview
CVE-2024-9357 is a Reflected Cross-Site Scripting (XSS) vulnerability in the xili-tidy-tags plugin for WordPress. The flaw affects all versions up to and including 1.12.04 and stems from insufficient input sanitization and output escaping on the action parameter. Unauthenticated attackers can inject arbitrary JavaScript that executes in the browser of any user tricked into clicking a crafted link. Successful exploitation can lead to session theft, administrative action abuse, or redirection to attacker-controlled infrastructure. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Unauthenticated attackers can execute arbitrary scripts in an authenticated administrator's browser via a crafted URL, enabling account takeover of WordPress sites running vulnerable xili-tidy-tags installations.
Affected Products
- WordPress xili-tidy-tags plugin versions 1.12.04 and earlier
- WordPress sites with the plugin installed and activated
- Administrative interfaces exposed to the public internet
Discovery Timeline
- 2024-11-12 - CVE-2024-9357 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-9357
Vulnerability Analysis
The vulnerability resides in the plugin's administrative handler, specifically within class-xili-tidy-tags-admin.php around line 156. The action parameter supplied through an HTTP request is reflected back into the rendered page without proper sanitization or output escaping. When an administrator loads a URL containing attacker-controlled script payloads in the action parameter, the browser parses and executes the injected JavaScript in the context of the WordPress admin origin.
Because the attack requires only user interaction and no prior authentication, exploitation is practical through phishing emails, forum posts, or malicious referrers. The injected script runs with the privileges of the victim session, allowing it to issue authenticated requests, exfiltrate cookies not marked HttpOnly, or modify site content.
Root Cause
The plugin fails to apply WordPress sanitization helpers such as sanitize_text_field() on inbound request parameters and does not escape output using functions like esc_attr() or esc_html() when echoing the action value into the page. This omission allows raw HTML and script content to flow from request to response unmodified.
Attack Vector
An attacker crafts a URL targeting the vulnerable admin page with a malicious payload embedded in the action query parameter. The attacker delivers the URL to a logged-in WordPress user, typically an administrator, via social engineering. When the victim visits the link, the payload executes in their browser. Review the plugin source referenced by the advisory and the Wordfence vulnerability report for additional technical context.
// No verified public exploit code is available.
// The vulnerability is triggered by reflecting an unsanitized
// 'action' request parameter into the admin page response.
Detection Methods for CVE-2024-9357
Indicators of Compromise
- Web server access logs containing requests to wp-admin pages with suspicious characters such as <script>, onerror=, or encoded variants in the action parameter
- Outbound requests from administrator browsers to unrecognized external domains shortly after loading a WordPress admin URL
- Unexpected creation of WordPress administrator accounts or modifications to plugin and theme files
- Unusual session activity originating from administrator accounts, including API calls to /wp-json/wp/v2/users from unknown IP addresses
Detection Strategies
- Inspect HTTP request logs for action parameter values containing HTML tags, JavaScript event handlers, or URL-encoded script fragments
- Deploy a Web Application Firewall (WAF) rule set that identifies reflected XSS payloads in query strings targeting WordPress admin endpoints
- Correlate browser Content Security Policy (CSP) violation reports against administrator user agents to surface in-browser script execution attempts
Monitoring Recommendations
- Enable WordPress audit logging for administrative actions, plugin changes, and user role modifications
- Monitor file integrity on wp-content/plugins/ and the WordPress core directories for unauthorized changes
- Alert on any new administrator account creation or privilege changes outside of approved change windows
How to Mitigate CVE-2024-9357
Immediate Actions Required
- Update the xili-tidy-tags plugin to version 1.12.05 or later, which addresses the reflected XSS flaw
- If an immediate update is not possible, deactivate and remove the xili-tidy-tags plugin until a patched version is deployed
- Force a password reset and invalidate active sessions for all WordPress administrator accounts
- Review recent administrative activity, user accounts, and installed plugins for unauthorized changes
Patch Information
The plugin maintainer released version 1.12.05 to remediate the vulnerability. The code changes between the vulnerable and patched versions are documented in the WordPress plugin changeset. Administrators should apply the update through the WordPress plugin dashboard or by replacing the plugin files directly.
Workarounds
- Deploy a WAF rule that blocks requests containing HTML or script metacharacters in the action query parameter targeting plugin admin pages
- Restrict access to wp-admin by IP allowlist where feasible to reduce the exposed attack surface
- Enforce a strict Content Security Policy on the WordPress admin interface to limit inline script execution
- Train administrators to avoid clicking unsolicited links that reference WordPress admin URLs
# Example WAF rule concept (ModSecurity) blocking script tags in the 'action' parameter
SecRule ARGS:action "@rx (?i)(<script|onerror=|javascript:)" \
"id:1009357,phase:2,deny,status:403,msg:'Blocked potential XSS targeting xili-tidy-tags (CVE-2024-9357)'"
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

