CVE-2025-12413
Executive Summary
CVE-2025-12413 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the Social Media WPCF7 Stop Words WordPress plugin, versions up to and including 1.1.3. The vulnerability resides in the smWpCfSwOptions() function, which lacks proper nonce validation. This allows an unauthenticated attacker to forge requests that, when triggered by a logged-in administrator (e.g., via a malicious link), can modify plugin settings and inject malicious web scripts (stored XSS). The CVSS v3.1 base score is 5.4 (Medium), with a low EPSS probability (0.0%) indicating limited active exploitation at this time. No public exploit code or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository. Administrators should verify the integrity of the plugin files and monitor for updates from the vendor. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed for the forged request.
- User Interaction (UI): Required (R) – The victim (admin) must click a link or visit a malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): Low (L) – Limited data exposure possible via XSS.
- Integrity (I): Low (L) – Settings can be altered, scripts injected.
- Availability (A): Low (L) – Potential for minor disruption via script injection.
Threat Level: Medium. While the CVSS score is moderate, the combination of CSRF and stored XSS can lead to persistent compromise of the WordPress admin panel, enabling further attacks like privilege escalation or malware distribution.
Deep Dive & Mechanics
The vulnerability is a classic CSRF in the WordPress plugin's settings page. The smWpCfSwOptions() function handles saving plugin options but does not verify a nonce (a one-time token) to ensure the request originated from the legitimate admin interface. An attacker can craft a malicious HTML page or email containing a form that automatically submits a POST request to the vulnerable endpoint. If an authenticated admin visits this page, the browser sends the request with the admin's cookies, and the plugin processes it as legitimate.
The injected malicious web scripts (stored XSS) are saved in the plugin's settings (e.g., in the wp_options table). When the admin or other users view the plugin settings page, the script executes in their browser, potentially stealing session cookies, redirecting to phishing sites, or performing actions on behalf of the victim.
WordPress Ecosystem Context: This is a WordPress plugin vulnerability, not a server-level issue. The attack relies on the admin's session and the plugin's lack of CSRF protection.
Vulnerable vs. Patched Code
Vulnerable Code (smWpCfSwOptions function in versions <= 1.1.3):
function smWpCfSwOptions() {
// No nonce check
if (isset($_POST['sm_wpcf7_stop_words_options'])) {
update_option('sm_wpcf7_stop_words_options', $_POST['sm_wpcf7_stop_words_options']);
}
}
Patched Code (hypothetical fix):
function smWpCfSwOptions() {
// Verify nonce
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'sm_wpcf7_stop_words_nonce')) {
return;
}
if (isset($_POST['sm_wpcf7_stop_words_options'])) {
update_option('sm_wpcf7_stop_words_options', $_POST['sm_wpcf7_stop_words_options']);
}
}
The patch adds a nonce check using WordPress's wp_verify_nonce() function, ensuring the request originates from the admin panel.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Setup: Install WordPress with the vulnerable plugin (version 1.1.3) on a local lab (e.g., using Docker or XAMPP). Create an admin user.
- Craft Exploit: Create an HTML file (
exploit.html) that auto-submits a form to the vulnerable endpoint:<html> <body> <form action="http://target/wp-admin/admin-post.php" method="POST"> <input type="hidden" name="action" value="smWpCfSwOptions"> <input type="hidden" name="sm_wpcf7_stop_words_options[stop_words]" value="<script>alert('XSS')</script>"> <input type="submit" value="Submit"> </form> <script>document.forms[0].submit();</script> </body> </html> - Delivery: Host the file on an attacker-controlled server and send the link to the admin (e.g., via email or social engineering).
- Execution: When the admin clicks the link, the form auto-submits, updating the plugin settings with the XSS payload. The script executes when the admin visits the plugin settings page.
Blue Team (Defense & Detection)
- Monitor Logs: Check WordPress access logs for unusual POST requests to
/wp-admin/admin-post.phpwithaction=smWpCfSwOptionsfrom unexpected referrers. - User Education: Train admins to avoid clicking suspicious links and to use browser extensions that block CSRF attacks.
- Web Application Firewall (WAF): Deploy rules to block requests to
admin-post.phpwithout a valid nonce (if possible). - Plugin Hardening: Temporarily disable the plugin until a patch is available. Use a security plugin like Wordfence to add CSRF protection.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-post.phpwith parameteraction=smWpCfSwOptionsand no_wpnonceparameter. - File System: Modified
wp_optionstable entry forsm_wpcf7_stop_words_optionscontaining unexpected JavaScript or HTML. - Behavior: Unauthorized changes to plugin settings, unexpected pop-ups or redirects in admin panel.
- Logs: WordPress debug log entries showing
update_optionforsm_wpcf7_stop_words_optionswithout preceding nonce validation.
Detection Engineering
YARA Rule
rule CVE_2025_12413_CSRF_XSS {
meta:
description = "Detects exploitation attempts for CVE-2025-12413 in WordPress logs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12413"
strings:
$csrf = "action=smWpCfSwOptions" nocase
$xss1 = "<script>" nocase
$xss2 = "onerror=" nocase
$xss3 = "javascript:" nocase
condition:
$csrf and any of ($xss*)
}
Sigma Rule
title: CVE-2025-12413 - CSRF to Stored XSS in Social Media WPCF7 Stop Words
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects POST requests to admin-post.php with action smWpCfSwOptions and potential XSS payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: POST
cs-uri-query|contains: "action=smWpCfSwOptions"
filter:
cs-uri-query|contains: "_wpnonce"
condition: selection and not filter
falsepositives:
- Legitimate admin actions if nonce is missing due to plugin bug
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-12413 - CSRF to XSS in Social Media WPCF7 Stop Words"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-post.php"; http_uri; content:"action=smWpCfSwOptions"; http_client_body; pcre:"/(<script|onerror|javascript)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Social Media WPCF7 Stop Words plugin until a patched version is released.
- Vendor Patch: Monitor the WordPress plugin repository for an update. Apply the patch as soon as it becomes available.
- Workaround: If the plugin is critical, implement a custom nonce check by adding the following code to the theme's
functions.php(temporary):add_action('admin_post_smWpCfSwOptions', 'custom_nonce_check', 1); function custom_nonce_check() { if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'sm_wpcf7_stop_words_nonce')) { wp_die('CSRF detected.'); } } - Long-term: Enforce CSRF protection across all WordPress plugins. Use security plugins that add nonce validation automatically.
- User Training: Educate administrators on recognizing phishing attempts and the importance of not clicking untrusted links.
Valters IT
DevSecOps & Cyber Threat Intelligence
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.