CVE-2024-9296

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Advocate Office Management System 1.0 allows attackers to execute arbitrary SQL commands via the username parameter in the forgot password function. Attackers can exploit this remotely without authentication to potentially access, modify, or delete database contents. All deployments of version 1.0 are affected.

💻 Affected Systems

Products:
  • SourceCodester Advocate Office Management System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable by default. The vulnerability exists in the core forgot password functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including credential theft, data exfiltration, privilege escalation, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to sensitive data including user credentials, client information, and system configuration, potentially leading to authentication bypass or data manipulation.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and network segmentation preventing database access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit details are available on GitHub. The vulnerability requires no authentication and has simple exploitation vectors.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

No official patch available. Consider implementing parameterized queries in /control/forgot_pass.php or upgrading if a newer version becomes available.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and sanitization for the username parameter in forgot_pass.php

Edit /control/forgot_pass.php to add parameterized queries or input filtering

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting forgot_pass.php

Add WAF rule: Block requests to /control/forgot_pass.php with SQL injection patterns in parameters

🧯 If You Can't Patch

  • Network segmentation: Isolate the application server from critical databases and other systems
  • Implement strict access controls and monitoring on the database server

🔍 How to Verify

Check if Vulnerable:

Test the /control/forgot_pass.php endpoint with SQL injection payloads in the username parameter and observe time delays or error responses

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Verify that parameterized queries are implemented in forgot_pass.php and test with SQL injection payloads that should be rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed password reset attempts with SQL patterns
  • Requests to forgot_pass.php with suspicious parameters

Network Indicators:

  • HTTP POST requests to /control/forgot_pass.php containing SQL keywords in parameters
  • Unusual database query patterns from application server

SIEM Query:

source="web_logs" AND uri="/control/forgot_pass.php" AND (param="username" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|exec|sleep|waitfor|benchmark)")

🔗 References

📤 Share & Export