CVE-2021-43631

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to execute arbitrary SQL commands through the appointment_no parameter in payment.php. It affects Hospital Management System v1.0 installations, potentially compromising patient data and system integrity. Any organization using this specific version is vulnerable.

💻 Affected Systems

Products:
  • Projectworlds Hospital Management System
Versions: v1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of v1.0 are vulnerable. The system appears to be a free PHP project without enterprise support.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, authentication bypass, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized access to sensitive patient records, appointment data, and financial information stored in the database.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH - The vulnerability is in a web application parameter that can be exploited remotely without authentication.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to authenticated or unauthenticated attacks depending on configuration.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

SQL injection vulnerabilities are commonly weaponized. The public GitHub issue demonstrates the vulnerability clearly.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider: 1. Review the GitHub issue for community fixes 2. Implement parameterized queries 3. Add input validation for appointment_no parameter 4. Consider migrating to a supported system

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to ensure appointment_no contains only expected characters (numbers)

Modify payment.php to validate appointment_no parameter before processing

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Add SQL injection detection rules to your WAF configuration

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict internal network access
  • Implement strict database permissions and monitor for unusual SQL queries

🔍 How to Verify

Check if Vulnerable:

Test payment.php with SQL injection payloads in appointment_no parameter (e.g., ' OR '1'='1)

Check Version:

Check the system version in documentation or configuration files

Verify Fix Applied:

Test with same payloads after implementing fixes - should return error or no data

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed appointment lookups
  • SQL keywords in appointment_no parameter values

Network Indicators:

  • HTTP requests to payment.php with SQL injection patterns in parameters

SIEM Query:

web.url:*payment.php* AND (web.param.appointment_no:*OR* OR web.param.appointment_no:*UNION* OR web.param.appointment_no:*SELECT*)

🔗 References

📤 Share & Export