CVE-2024-12220 Overview
The SMS for WooCommerce plugin for WordPress contains a Cross-Site Request Forgery (CSRF) vulnerability affecting all versions up to and including 2.8.1. The flaw stems from missing or incorrect nonce validation on a plugin function. Unauthenticated attackers can inject malicious web scripts through a forged request when a site administrator is tricked into clicking a crafted link. The issue is classified under CWE-352: Cross-Site Request Forgery.
Critical Impact
Successful exploitation combines CSRF with script injection, allowing attackers to execute arbitrary JavaScript in the context of an authenticated administrator session on affected WooCommerce sites.
Affected Products
- SMS for WooCommerce plugin (wc-sms) for WordPress
- All versions up to and including 2.8.1
- WordPress sites running WooCommerce with the affected plugin installed
Discovery Timeline
- 2024-12-17 - CVE-2024-12220 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-12220
Vulnerability Analysis
The vulnerability is a CSRF flaw that chains into a stored or reflected Cross-Site Scripting (XSS) condition. The plugin exposes at least one privileged action handler that does not verify a WordPress nonce token before processing incoming requests. Because state-changing operations are not tied to a unique per-session token, any HTTP request originating from an authenticated administrator's browser is treated as legitimate.
Attackers exploit this by hosting a malicious page or crafting a link that submits a forged request to the target WordPress site. When an administrator visits the attacker-controlled resource while authenticated, the browser automatically sends the administrator's session cookies with the request. The plugin then processes the attacker-supplied input and stores or reflects it, resulting in script execution in the administrator's browser context.
Detailed advisory information is available in the Wordfence Vulnerability Report.
Root Cause
The root cause is missing or incorrect nonce validation in a plugin handler function. WordPress provides wp_verify_nonce() and check_admin_referer() primitives specifically to prevent CSRF against privileged endpoints. Without these checks, the plugin cannot distinguish between an intentional administrator action and a forged cross-origin request.
Attack Vector
Exploitation requires user interaction from a privileged user. An attacker crafts a page containing a form or link that targets the vulnerable plugin endpoint. The attacker then delivers the URL through phishing, social engineering, or a comment field. When the administrator triggers the request, the plugin executes the attacker-controlled action and persists or reflects malicious JavaScript. The injected script runs with the administrator's privileges and can create new admin accounts, exfiltrate data, or modify site content.
No verified public exploit code is available at this time. The fix commit is visible in the WordPress Plugin Change Log.
Detection Methods for CVE-2024-12220
Indicators of Compromise
- Unexpected administrator accounts or role changes in the WordPress users table
- WooCommerce SMS plugin settings modified without corresponding entries in administrator audit logs
- Outbound HTTP requests from admin browsers to unfamiliar external domains following visits to third-party links
- New or modified <script> tags rendered within plugin-controlled admin pages
Detection Strategies
- Review web server access logs for POST requests to wc-sms plugin endpoints that lack a valid Referer header pointing to wp-admin
- Correlate WordPress activity logs against successful state-changing requests missing nonce parameters
- Monitor plugin database options (wp_options) for values containing <script>, onerror=, or javascript: payloads
- Deploy a Web Application Firewall (WAF) rule to flag cross-origin POST requests targeting the plugin's admin action handlers
Monitoring Recommendations
- Enable WordPress security audit logging to record all administrator actions and settings changes
- Track installed plugin versions across the fleet and alert on any WooCommerce SMS installation at version 2.8.1 or earlier
- Set browser Content Security Policy (CSP) headers to block inline script execution in the admin dashboard where feasible
How to Mitigate CVE-2024-12220
Immediate Actions Required
- Update the SMS for WooCommerce plugin to a version newer than 2.8.1 that includes the fix from changeset 3207316
- Audit WordPress administrator accounts and remove any unrecognized users created recently
- Force a password reset for all administrator accounts and invalidate active sessions
- Review plugin settings and stored options for injected scripts or unexpected configuration changes
Patch Information
The plugin maintainer has committed a fix visible in the WordPress Plugin Trac changeset 3207316. Site administrators should install the latest version available from the WC SMS plugin page. The patch introduces nonce validation on the previously unprotected function.
Workarounds
- Deactivate and remove the SMS for WooCommerce plugin until an update can be applied
- Restrict wp-admin access to trusted IP addresses using web server or firewall rules
- Advise administrators to log out of WordPress sessions before browsing untrusted links
- Deploy a WordPress-aware WAF to filter requests missing valid nonce tokens on plugin admin endpoints
# Verify installed plugin version via WP-CLI and update if vulnerable
wp plugin get wc-sms --field=version
wp plugin update wc-sms
# Temporarily deactivate the plugin if a patch cannot be applied immediately
wp plugin deactivate wc-sms
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

