CVE-2024-9318

6.3 MEDIUM

📋 TL;DR

This is a critical SQL injection vulnerability in SourceCodester Advocate Office Management System 1.0 that allows attackers to execute arbitrary SQL commands via the 'id' parameter in /control/activate.php. The vulnerability can be exploited remotely without authentication, potentially leading to data theft, modification, or system compromise. All users running the affected software are at risk.

💻 Affected Systems

Products:
  • SourceCodester Advocate Office Management System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation. No special configuration is required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data exfiltration, data manipulation, privilege escalation, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized access to sensitive data (client information, case details, user credentials), data manipulation, and potential system takeover.

🟢

If Mitigated

Limited impact with proper input validation, WAF rules, and database permissions restricting damage to non-critical data.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code is available on GitHub. The vulnerability requires minimal technical skill to exploit.

🛠️ 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 patch available, download and apply
3. Test functionality after patching

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the 'id' parameter before processing

Modify /control/activate.php to validate/sanitize the id parameter using prepared statements or parameterized queries

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

Add WAF rule to detect and block SQL injection attempts on /control/activate.php

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict network segmentation and monitor all traffic to the vulnerable endpoint

🔍 How to Verify

Check if Vulnerable:

Test the /control/activate.php endpoint with SQL injection payloads in the 'id' parameter

Check Version:

Check system version in admin panel or configuration files

Verify Fix Applied:

Test with SQL injection payloads after applying fixes to confirm they are blocked

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in logs
  • Multiple requests to /control/activate.php with suspicious parameters
  • Database error logs showing injection attempts

Network Indicators:

  • HTTP requests to /control/activate.php containing SQL keywords (UNION, SELECT, INSERT, etc.)
  • Unusual traffic patterns to the vulnerable endpoint

SIEM Query:

source="web_logs" AND uri="/control/activate.php" AND (request_parameters CONTAINS "UNION" OR request_parameters CONTAINS "SELECT" OR request_parameters CONTAINS "INSERT")

🔗 References

📤 Share & Export