CVE-2024-45985

4.7 MEDIUM

📋 TL;DR

This is a Cross-Site Scripting (XSS) vulnerability in the Blood Bank and Donation Management System v1.0 that allows attackers to inject malicious scripts via the name parameter in update_contact.php. When exploited, this could lead to session hijacking, credential theft, or defacement of the application. Organizations using this specific version of the blood bank management system are affected.

💻 Affected Systems

Products:
  • Blood Bank and Donation Management System
Versions: v1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation. Any system with update_contact.php accessible is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker steals administrator session cookies, gains full control of the blood bank system, modifies donor/recipient data, or redirects users to malicious sites.

🟠

Likely Case

Attacker performs session hijacking of authenticated users, steals credentials via fake login forms, or defaces the application interface.

🟢

If Mitigated

With proper input validation and output encoding, the malicious scripts are neutralized and rendered harmless.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires the attacker to have access to submit data to the vulnerable parameter, typically requiring some level of access to the application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Download the latest version if available from the vendor. 2. Replace the vulnerable update_contact.php file. 3. Implement proper input validation and output encoding in all user-input handling code.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to sanitize the name parameter before processing.

Modify update_contact.php to include: htmlspecialchars($_POST['name'], ENT_QUOTES, 'UTF-8');

Web Application Firewall (WAF) Rules

all

Configure WAF to block XSS payloads in the name parameter.

Add rule to block patterns like: <script>, javascript:, onload=, etc.

🧯 If You Can't Patch

  • Restrict access to update_contact.php to authorized users only using authentication and authorization controls.
  • Implement Content Security Policy (CSP) headers to mitigate the impact of successful XSS attacks.

🔍 How to Verify

Check if Vulnerable:

Test by submitting a payload like <script>alert('XSS')</script> in the name parameter of update_contact.php and check if it executes.

Check Version:

Check the system version in the admin panel or configuration files.

Verify Fix Applied:

After applying fixes, test with the same XSS payload and verify it does not execute and is properly encoded in output.

📡 Detection & Monitoring

Log Indicators:

  • Unusual long strings in name parameter logs
  • Presence of script tags or JavaScript code in POST requests

Network Indicators:

  • HTTP POST requests to update_contact.php containing suspicious patterns in parameters

SIEM Query:

source="web_logs" AND uri="/update_contact.php" AND (param_name="name" AND param_value MATCHES "<script>|javascript:|onload=")

🔗 References

📤 Share & Export