CVE-2024-7198
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Complaints Report Management System 1.0 allows attackers to manipulate database queries through the 'id' parameter in /admin/manage_station.php. Attackers can potentially read, modify, or delete sensitive data, and in some cases gain administrative access. All deployments of this specific software version are affected.
💻 Affected Systems
- SourceCodester Complaints Report Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise leading to data theft, data destruction, or full system takeover via privilege escalation.
Likely Case
Unauthorized data access, credential theft, and potential administrative account takeover.
If Mitigated
Limited data exposure if proper input validation and database permissions are enforced.
🎯 Exploit Status
Exploit requires access to admin interface but SQL injection is straightforward once authenticated. Public proof-of-concept available on GitHub gist.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
No official patch available. Consider upgrading to a newer version if available, or implement input validation and parameterized queries in the source code.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection protection rules to block malicious requests.
Input Validation
allImplement server-side validation to ensure 'id' parameter contains only numeric values.
🧯 If You Can't Patch
- Isolate the application behind a reverse proxy with strict input filtering
- Implement network segmentation to limit database access from application servers
🔍 How to Verify
Check if Vulnerable:
Test the /admin/manage_station.php endpoint with SQL injection payloads in the 'id' parameter (e.g., id=1' OR '1'='1).
Check Version:
Check the software version in the application interface or configuration files.
Verify Fix Applied:
Verify that SQL injection attempts no longer succeed and that input validation is properly implemented.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Multiple failed login attempts followed by SQL injection patterns
- Requests to /admin/manage_station.php with suspicious 'id' parameters
Network Indicators:
- HTTP requests containing SQL keywords (SELECT, UNION, etc.) in URL parameters
- Unusual database connection patterns from application servers
SIEM Query:
source="web_logs" AND url="/admin/manage_station.php" AND (id="*'*" OR id="*SELECT*" OR id="*UNION*")
🔗 References
- https://gist.github.com/topsky979/424d2ac58623b0fb4d5232a4ecbe5110
- https://vuldb.com/?ctiid.272619
- https://vuldb.com/?id.272619
- https://vuldb.com/?submit.380420
- https://gist.github.com/topsky979/424d2ac58623b0fb4d5232a4ecbe5110
- https://vuldb.com/?ctiid.272619
- https://vuldb.com/?id.272619
- https://vuldb.com/?submit.380420