CVE-2025-31545
Executive Summary
CVE-2025-31545 is a Missing Authorization vulnerability (CWE-862) in the Safe Ai Malware Protection for WP WordPress plugin, developed by WP Messiah. This flaw allows an authenticated attacker with low privileges to exploit incorrectly configured access control security levels, potentially leading to unauthorized data modification or access to protected plugin features. The vulnerability affects all versions up to and including 1.0.20. As of this report, no official patch has been released, and no public proof-of-concept (PoC) code is available. The EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time, but the risk remains for sites using the plugin.
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 within the WordPress plugin ecosystem. The plugin is distributed via the official WordPress Plugin Directory and potentially through third-party repositories. Users are advised to verify the integrity of their plugin files and monitor for updates from the vendor. Since no patch is available, the supply chain risk is elevated, as site administrators must rely on alternative mitigations.
CVSS Breakdown & Threat Level
- CVSS Score: 5.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – An attacker needs a valid WordPress user account with minimal privileges.
- User Interaction (UI): None – No user action is required.
- Scope (S): Unchanged – The exploit does not affect other components.
- Confidentiality (C): Low – Limited unauthorized data access is possible.
- Integrity (I): Low – Limited unauthorized data modification is possible.
- Availability (A): None – No impact on system availability.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the potential for privilege escalation within the plugin’s context warrant attention.
Deep Dive & Mechanics
The vulnerability stems from missing authorization checks in the plugin’s AJAX handlers or REST API endpoints. The plugin likely implements role-based access controls but fails to validate user capabilities before executing sensitive actions. An attacker with a subscriber or contributor role can send crafted HTTP requests to trigger functions intended for administrators, such as:
- Modifying malware scanning schedules.
- Disabling protection features.
- Accessing scan logs or configuration data.
The core issue is that the plugin uses wp_ajax_* hooks without verifying current_user_can() or wp_verify_nonce() properly. This allows low-privileged users to invoke admin-level callbacks.
Vulnerable vs. Patched Code
Since no patch is available, a hypothetical fix is provided for illustration.
Vulnerable Code (Example):
add_action('wp_ajax_safe_ai_scan', 'safe_ai_scan_callback');
function safe_ai_scan_callback() {
// Missing capability check
$scan_type = $_POST['scan_type'];
// Execute scan...
}
Patched Code (Hypothetical):
add_action('wp_ajax_safe_ai_scan', 'safe_ai_scan_callback');
function safe_ai_scan_callback() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
check_ajax_referer('safe_ai_nonce', 'nonce');
$scan_type = sanitize_text_field($_POST['scan_type']);
// Execute scan...
}
Exploitation & Lab Setup
Red Team (Offensive)
- Prerequisites: A WordPress site with Safe Ai Malware Protection for WP <= 1.0.20 installed and a low-privileged user account (e.g., subscriber).
- Steps:
- Log in as the low-privileged user.
- Identify AJAX actions used by the plugin (e.g., via browser developer tools or by analyzing plugin source code).
- Craft a POST request to
/wp-admin/admin-ajax.phpwith the action parameter set to a privileged function (e.g.,safe_ai_disable_protection). - If no nonce or capability check is enforced, the request will succeed.
- Example Request:
POST /wp-admin/admin-ajax.php HTTP/1.1 Host: target-site.com Content-Type: application/x-www-form-urlencoded Cookie: wordpress_logged_in_... action=safe_ai_disable_protection&scan_type=full
Blue Team (Defensive)
- Detection: Monitor for unusual AJAX requests from low-privileged users to plugin-specific actions.
- Mitigation:
- Disable or remove the plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwith suspicious action parameters. - Restrict user roles and capabilities using a plugin like "User Role Editor".
- Hunting: Search logs for patterns like
POST /wp-admin/admin-ajax.phpwithaction=safe_ai_*from non-admin users.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/wp-admin/admin-ajax.phpwithactionparameters containingsafe_ai_from low-privileged user sessions. - Unusual scan initiation or configuration changes in plugin logs.
- HTTP POST requests to
- File System:
- Modified plugin configuration files (e.g.,
wp-content/plugins/safe-ai-malware-protection-for-wp/options.php).
- Modified plugin configuration files (e.g.,
- Logs:
- WordPress debug log entries showing unauthorized access attempts to plugin AJAX handlers.
Detection Engineering
YARA Rule
rule CVE_2025_31545_WordPress_Plugin {
meta:
description = "Detects vulnerable Safe Ai Malware Protection for WP plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-31545"
strings:
$ajax_hook = /add_action\s*\(\s*['\"]wp_ajax_safe_ai_/
$missing_cap = /current_user_can\s*\(/
condition:
$ajax_hook and not $missing_cap
}
Sigma Rule
title: CVE-2025-31545 - Missing Authorization in Safe Ai Malware Protection
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects unauthorized AJAX requests to vulnerable plugin endpoints
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
c-uri: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=safe_ai_'
sc-status: 200
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-31545 - Safe Ai Malware Protection Missing Authorization";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=safe_ai_"; http_client_body;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
- Immediate Action: Disable and remove the Safe Ai Malware Protection for WP plugin until a patched version is released.
- Workaround: If removal is not possible, restrict access to
wp-admin/admin-ajax.phpusing.htaccessrules or a WAF to only allow authenticated requests from trusted IPs. - Monitoring: Enable WordPress debug logging and monitor for unauthorized AJAX calls.
- Vendor Contact: Reach out to WP Messiah for an ETA on the patch.
- Long-term: Implement a principle of least privilege for all WordPress users and regularly audit plugin permissions.
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.