CVE-2025-5208

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Online Hospital Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the emailid parameter in /admin/check_availability.php. This can lead to unauthorized data access, modification, or deletion. All users running this specific version are affected.

💻 Affected Systems

Products:
  • SourceCodester Online Hospital Management System
Versions: 1.0
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the default installation. The /admin/check_availability.php file is typically accessible if the system is deployed.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including patient records, admin credentials, and system takeover leading to data breach, ransomware deployment, or service disruption.

🟠

Likely Case

Unauthorized access to sensitive patient data, modification of medical records, or extraction of admin credentials for further system compromise.

🟢

If Mitigated

Limited impact due to proper input validation, parameterized queries, and network segmentation preventing successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. SQL injection via emailid parameter requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

1. Check vendor website for updates. 2. If no patch, implement workarounds. 3. Consider replacing with secure alternative.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to sanitize emailid parameter before processing

Modify /admin/check_availability.php to validate email format and escape special characters

Web Application Firewall Rule

all

Block SQL injection patterns targeting the vulnerable endpoint

Add WAF rule: deny requests to /admin/check_availability.php containing SQL keywords in emailid parameter

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement network segmentation to limit database server exposure

🔍 How to Verify

Check if Vulnerable:

Test /admin/check_availability.php with SQL injection payloads in emailid parameter and observe database errors or unexpected responses.

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Attempt SQL injection after fixes and confirm proper error handling or rejection of malicious input.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts via /admin/check_availability.php
  • Suspicious email parameters containing SQL keywords

Network Indicators:

  • HTTP POST requests to /admin/check_availability.php with SQL injection patterns
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri_path="/admin/check_availability.php" AND (emailid CONTAINS "' OR" OR emailid CONTAINS "UNION" OR emailid CONTAINS "SELECT")

🔗 References

📤 Share & Export