CVE-2024-9804

4.7 MEDIUM

📋 TL;DR

This is a critical SQL injection vulnerability in Blood Bank System 1.0 that allows attackers to manipulate database queries through the 'hospital' parameter in /admin/campsdetails.php. Attackers can potentially read, modify, or delete database contents remotely. Organizations using this specific version of the blood bank management software are affected.

💻 Affected Systems

Products:
  • Blood Bank System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires the admin interface to be accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including sensitive medical data exfiltration, administrative account takeover, and potential system-wide data destruction.

🟠

Likely Case

Unauthorized data access and extraction of sensitive patient/donor information, potentially leading to data breaches and privacy violations.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting unauthorized data access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub, making this easily exploitable by attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://code-projects.org/

Restart Required: No

Instructions:

1. Check vendor website for security updates
2. If patch available, download and apply
3. Test functionality after applying fix

🔧 Temporary Workarounds

Input Validation Implementation

all

Add parameterized queries and input validation for the hospital parameter

Modify /admin/campsdetails.php to use prepared statements

Access Restriction

linux

Restrict access to admin interface using firewall rules or authentication

iptables -A INPUT -p tcp --dport 80 -s trusted_ips -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with SQL injection rules
  • Isolate the system from internet access and restrict to internal network only

🔍 How to Verify

Check if Vulnerable:

Test the /admin/campsdetails.php endpoint with SQL injection payloads in the hospital parameter

Check Version:

Check software version in admin panel or configuration files

Verify Fix Applied:

Attempt SQL injection after applying fixes and verify no database errors or unauthorized data access occurs

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin interface
  • Unexpected database error messages in web logs

Network Indicators:

  • SQL injection patterns in HTTP requests to /admin/campsdetails.php
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/admin/campsdetails.php" AND (query CONTAINS "UNION" OR query CONTAINS "SELECT" OR query CONTAINS "--" OR query CONTAINS "' OR '1'='1")

🔗 References

📤 Share & Export