CVE-2022-32345
📋 TL;DR
This SQL injection vulnerability in Hospital's Patient Records Management System v1.0 allows attackers to manipulate database queries through the 'id' parameter in the manage_room.php admin page. Attackers could potentially access, modify, or delete sensitive patient records. This affects all organizations using the vulnerable version of this healthcare software.
💻 Affected Systems
- Hospital's Patient Records Management System
📦 What is this software?
Hospital\'s Patient Records Management System by Hospital\'s Patient Records Management System Project
View all CVEs affecting Hospital\'s Patient Records Management System →
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of patient database including theft of medical records, modification of treatment data, deletion of critical patient information, and potential ransomware deployment across the healthcare system.
Likely Case
Unauthorized access to patient records, exposure of sensitive health information (PHI), and potential data exfiltration for identity theft or blackmail.
If Mitigated
Limited impact with proper input validation and database permissions, potentially only error messages or limited data exposure.
🎯 Exploit Status
Exploitation requires admin access to the /hprms/admin/ endpoint, but SQL injection techniques are well-documented and easy to implement.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: Unknown
Restart Required: No
Instructions:
No official patch available. Implement workarounds and consider migrating to a supported, secure alternative system.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection protection rules to block malicious requests to the vulnerable endpoint.
Input Validation Filter
allAdd server-side input validation to sanitize the 'id' parameter before processing.
Example PHP: $id = filter_var($_GET['id'], FILTER_VALIDATE_INT); if($id === false) { die('Invalid input'); }
🧯 If You Can't Patch
- Isolate the system on a separate network segment with strict access controls
- Implement database-level protections: use parameterized queries, restrict database user permissions, enable audit logging
🔍 How to Verify
Check if Vulnerable:
Test the endpoint with SQL injection payloads: /hprms/admin/rooms/manage_room.php?id=1' OR '1'='1
Check Version:
Check system documentation or about page for version information
Verify Fix Applied:
Test with the same payloads after implementing fixes - should return error or no data instead of executing SQL
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in application logs
- Multiple failed login attempts followed by SQL payloads
- Requests with SQL keywords in URL parameters
Network Indicators:
- HTTP requests containing SQL syntax in the 'id' parameter
- Unusual database query patterns from application server
SIEM Query:
source="web_logs" AND (url="*manage_room.php*" AND (param="*id=*'*" OR param="*id=* OR *" OR param="*id=* UNION *"))