CVE-2021-43630
📋 TL;DR
CVE-2021-43630 is a SQL injection vulnerability in Projectworlds Hospital Management System v1.0 that allows authenticated attackers to execute arbitrary SQL commands via multiple parameters in add_patient.php. This can lead to database compromise and potentially remote code execution on the web server. Only users running this specific vulnerable version are affected.
💻 Affected Systems
- Projectworlds Hospital Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attacker gains full control of the database, extracts sensitive patient/medical data, and achieves remote code execution on the web server to compromise the entire system.
Likely Case
Attacker extracts sensitive patient data, modifies medical records, or disrupts hospital operations by manipulating the database.
If Mitigated
With proper input validation and parameterized queries, SQL injection is prevented and database remains secure.
🎯 Exploit Status
Exploitation requires authenticated access. SQL injection is well-understood and tools like sqlmap can automate exploitation.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Not available
Vendor Advisory: Not available
Restart Required: No
Instructions:
No official patch exists. Implement parameterized queries in add_patient.php and all other PHP files that handle database operations.
🔧 Temporary Workarounds
Implement Input Validation
allAdd strict input validation and sanitization for all parameters in add_patient.php
Edit add_patient.php to validate and sanitize all user inputs before database queries
Web Application Firewall
allDeploy WAF with SQL injection protection rules
🧯 If You Can't Patch
- Isolate the system on a separate network segment with strict access controls
- Implement database monitoring and alerting for suspicious SQL queries
🔍 How to Verify
Check if Vulnerable:
Review add_patient.php for direct concatenation of user input in SQL queries without parameterization
Check Version:
Check the system's version file or documentation for 'v1.0' reference
Verify Fix Applied:
Test with SQL injection payloads in patient form fields to confirm they're properly sanitized
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Multiple failed login attempts followed by SQL injection patterns
Network Indicators:
- HTTP POST requests to add_patient.php with SQL keywords in parameters
SIEM Query:
source="web_server_logs" AND uri="*add_patient.php*" AND (request="*UNION*" OR request="*SELECT*" OR request="*INSERT*" OR request="*DELETE*")
🔗 References
- https://github.com/projectworldsofficial/hospital-management-system-in-php/issues/4
- https://projectworlds.in/free-projects/php-projects/hospital-management-system-in-php/
- https://github.com/projectworldsofficial/hospital-management-system-in-php/issues/4
- https://projectworlds.in/free-projects/php-projects/hospital-management-system-in-php/