CVE-2024-7361
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Tracking Monitoring Management System 1.0 allows attackers to execute arbitrary SQL commands via the 'id' parameter in the /ajax.php?action=save_establishment endpoint. Organizations using this specific version of the software are affected, and exploitation can occur remotely without authentication.
💻 Affected Systems
- SourceCodester Tracking Monitoring Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution via database functions.
Likely Case
Unauthorized data access, extraction of sensitive information, and potential system compromise through database manipulation.
If Mitigated
Limited impact with proper input validation, parameterized queries, and network segmentation preventing exploitation.
🎯 Exploit Status
Public exploit available on GitHub gist; SQL injection is a well-understood attack vector with many automated tools available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None known
Restart Required: No
Instructions:
No official patch available. Consider upgrading to a newer version if available, or implement workarounds.
🔧 Temporary Workarounds
Web Application Firewall (WAF) Rules
allImplement WAF rules to block SQL injection patterns targeting the /ajax.php endpoint with 'save_establishment' action.
Input Validation Filter
allAdd server-side validation to sanitize the 'id' parameter, allowing only expected data types.
🧯 If You Can't Patch
- Block external access to the vulnerable endpoint using network ACLs or firewall rules.
- Implement database-level protections: restrict application database user permissions to minimum required.
🔍 How to Verify
Check if Vulnerable:
Test the /ajax.php?action=save_establishment endpoint with SQL injection payloads in the 'id' parameter and monitor for database errors or unexpected responses.
Check Version:
Check system documentation or admin interface for version information; typically displayed in footer or about page.
Verify Fix Applied:
Verify that SQL injection attempts no longer succeed and that input validation is properly implemented for the 'id' parameter.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL error messages in application logs
- Multiple rapid requests to /ajax.php with varying 'id' parameters
- Database query logs showing unexpected SQL syntax
Network Indicators:
- HTTP requests to /ajax.php?action=save_establishment containing SQL keywords in parameters
- Unusual database connection patterns from application server
SIEM Query:
source="web_logs" AND uri_path="/ajax.php" AND query_string="*action=save_establishment*" AND (query_string="*UNION*" OR query_string="*SELECT*" OR query_string="*INSERT*" OR query_string="*DELETE*")