CVE-2025-3955
📋 TL;DR
CVE-2025-3955 is a critical SQL injection vulnerability in codeprojects Patient Record Management System 1.0 that allows remote attackers to execute arbitrary SQL commands via the id/lastname parameters in /edit_rpatient.php.php. This affects all users running the vulnerable version of this healthcare management software, potentially exposing sensitive patient records.
💻 Affected Systems
- codeprojects Patient Record Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including patient medical records, personal information, and system credentials, leading to data theft, manipulation, or destruction.
Likely Case
Unauthorized access to patient records, extraction of sensitive healthcare data, and potential privilege escalation within the system.
If Mitigated
Limited impact with proper input validation and database permissions, potentially only allowing information disclosure without data modification.
🎯 Exploit Status
Exploit details are publicly available on GitHub, making this easily weaponizable by attackers with basic SQL injection knowledge.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
No official patch is available. Consider upgrading to a newer version if available, or implement workarounds and input validation.
🔧 Temporary Workarounds
Input Validation and Sanitization
allImplement strict input validation and parameterized queries for the id and lastname parameters in edit_rpatient.php.php
Modify PHP code to use prepared statements: $stmt = $conn->prepare('SELECT * FROM patients WHERE id = ? AND lastname = ?'); $stmt->bind_param('is', $id, $lastname);
Web Application Firewall (WAF) Rules
allDeploy WAF rules to block SQL injection patterns targeting the vulnerable endpoint
Add WAF rule: Block requests to /edit_rpatient.php.php containing SQL keywords like UNION, SELECT, INSERT, UPDATE, DELETE, DROP, OR, AND in parameters
🧯 If You Can't Patch
- Implement network segmentation to isolate the Patient Record Management System from untrusted networks
- Deploy database monitoring to detect unusual SQL queries and access patterns
🔍 How to Verify
Check if Vulnerable:
Test the /edit_rpatient.php.php endpoint with SQL injection payloads in id or lastname parameters (e.g., id=1' OR '1'='1)
Check Version:
Check the software version in the application interface or configuration files
Verify Fix Applied:
Verify that parameterized queries are implemented and test with SQL injection payloads to confirm they are blocked or sanitized
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL error messages in application logs
- Multiple failed login attempts or parameter manipulation in access logs
- Requests to /edit_rpatient.php.php with SQL keywords in parameters
Network Indicators:
- Unusual database connection patterns from the web server
- Large data transfers from the database server
SIEM Query:
source="web_logs" AND uri="/edit_rpatient.php.php" AND (param="id" OR param="lastname") AND (value="*UNION*" OR value="*SELECT*" OR value="*OR*" OR value="*AND*")