CVE-2024-7454

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Clinics Patient Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the patient_name function in patients.php. It affects all deployments of this specific software version, potentially compromising patient data and system integrity.

💻 Affected Systems

Products:
  • SourceCodester Clinics Patient Management System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only version 1.0 is confirmed affected; other versions may be vulnerable if similar code exists.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise leading to data theft, manipulation, or deletion; potential remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized access to sensitive patient records, including personal and medical data.

🟢

If Mitigated

Limited impact if input validation and parameterized queries are enforced, though risk remains if vulnerable code is exposed.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly disclosed, making attacks straightforward for malicious actors.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch exists; apply workarounds or consider alternative software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and sanitization for the patient_name parameter in patients.php to block SQL injection attempts.

Modify patients.php to use prepared statements or escape user inputs.

Web Application Firewall (WAF) Rules

all

Deploy a WAF with rules to detect and block SQL injection patterns targeting the patient_name parameter.

Configure WAF to filter malicious SQL payloads.

🧯 If You Can't Patch

  • Isolate the system from the internet and restrict access to trusted networks only.
  • Monitor logs for unusual database queries or access patterns related to patients.php.

🔍 How to Verify

Check if Vulnerable:

Test the patient_name parameter in patients.php with SQL injection payloads; if the system responds with database errors or unexpected data, it is vulnerable.

Check Version:

Check the software version in the system's admin panel or configuration files; look for '1.0'.

Verify Fix Applied:

After applying workarounds, retest with SQL injection payloads to ensure no database errors or unauthorized data access occurs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in application logs, especially involving patient_name parameter with suspicious characters like quotes or semicolons.

Network Indicators:

  • HTTP requests to patients.php containing SQL injection patterns in parameters.

SIEM Query:

source="web_logs" AND uri="*patients.php*" AND (param="*patient_name*" AND value="*' OR *")

🔗 References

📤 Share & Export