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-10046 Overview
CVE-2024-10046 is a Reflected Cross-Site Scripting (XSS) vulnerability in the Persian WooCommerce SMS plugin for WordPress. The flaw affects all versions up to and including 7.0.5. It stems from the use of remove_query_arg without appropriate escaping on the URL in the plugin's SMS Archive component. Unauthenticated attackers can inject arbitrary web scripts that execute in a victim's browser when the victim clicks a crafted link. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Unauthenticated attackers can execute arbitrary JavaScript in an authenticated administrator's browser session, enabling session theft, account takeover, or unauthorized administrative actions on the WordPress site.
Affected Products
- Persian WooCommerce SMS plugin (افزونه پیامک ووکامرس) for WordPress
- All versions up to and including 7.0.5
- WordPress sites running the vulnerable plugin with WooCommerce
Discovery Timeline
- 2024-12-07 - CVE-2024-10046 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-10046
Vulnerability Analysis
The vulnerability resides in the plugin's SMS archive page, specifically in src/SMS/Archive.php around line 93. The code uses WordPress's remove_query_arg function to construct URLs without applying output escaping. When user-controlled query parameters are reflected back into the generated page, attackers can inject HTML and JavaScript payloads.
Because the injection occurs in a scoped context that can affect other components, a successful attack can impact resources beyond the vulnerable component itself. Exploitation requires user interaction, typically a victim clicking a malicious link containing the crafted query string. The impact scales with the privileges of the victim account.
Root Cause
The root cause is missing output escaping when reflecting URL parameters back to the page. WordPress's remove_query_arg returns a URL string that must be passed through esc_url or esc_url_raw before being rendered in HTML. The vulnerable code omitted this sanitization, allowing raw attacker-controlled input to be echoed into the DOM.
Attack Vector
An attacker crafts a URL to a page on the target WordPress site that renders the plugin's archive view. The URL includes a query parameter containing a JavaScript payload. When an authenticated administrator or shop manager clicks the link, the payload executes in their browser under the site's origin. This grants the attacker access to session cookies, CSRF tokens, and the ability to submit authenticated requests on behalf of the victim.
Refer to the WordPress Plugin Archive Code and the Wordfence Vulnerability Report for the technical details of the vulnerable code path.
Detection Methods for CVE-2024-10046
Indicators of Compromise
- Inbound HTTP requests to WordPress admin pages containing suspicious query parameters with <script>, javascript:, onerror=, or URL-encoded equivalents such as %3Cscript%3E
- Referrer headers pointing to external or unexpected domains for requests targeting the Persian WooCommerce SMS plugin archive endpoint
- Unexpected administrative actions initiated shortly after an admin loaded a URL containing crafted query strings
Detection Strategies
- Inspect web server access logs for query strings targeting the plugin's SMS archive page and containing HTML or JavaScript metacharacters
- Deploy WordPress-focused web application firewall (WAF) rules that block reflected XSS patterns in query parameters on plugin routes
- Correlate admin session activity with the referring URL to identify sessions initiated from suspicious external links
Monitoring Recommendations
- Monitor for creation of new WordPress administrator accounts, plugin installations, or theme file modifications following admin logins
- Alert on outbound requests from the WordPress server to unknown domains that could indicate data exfiltration via injected scripts
- Track plugin version inventory across managed WordPress instances to identify hosts still running Persian WooCommerce SMS 7.0.5 or earlier
How to Mitigate CVE-2024-10046
Immediate Actions Required
- Update the Persian WooCommerce SMS plugin to a version later than 7.0.5 that includes the fix from WordPress Changeset #3201912
- If a patched version is not immediately available, deactivate the plugin on all affected WordPress installations
- Force logout of all WordPress administrator sessions and rotate credentials for privileged accounts
Patch Information
The vendor addressed the issue in the code repository under changeset 3201912. The fix applies proper escaping to URLs generated via remove_query_arg on the SMS archive page. Site administrators should update through the WordPress plugin management interface or by installing the corrected release from the plugin repository.
Workarounds
- Deploy a WAF rule that strips or blocks query parameters containing HTML tags on requests to the plugin's archive endpoint
- Restrict access to the WordPress admin interface by IP allowlisting to reduce the attack surface for reflected XSS
- Enable a strict Content Security Policy (CSP) that disallows inline script execution on admin pages
# Example Content Security Policy header for WordPress admin
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'"
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

