CVE-2024-6731
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Student Study Center Desk Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in the /Master.php?f=save_student endpoint. This can lead to data theft, modification, or deletion. All users running the vulnerable version are affected.
💻 Affected Systems
- SourceCodester Student Study Center Desk Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data exfiltration, modification, deletion, or potential server takeover via SQL injection escalation techniques.
Likely Case
Unauthorized access to student records, grade manipulation, personal data theft, and potential privilege escalation within the application.
If Mitigated
Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.
🎯 Exploit Status
Exploit details are publicly available, making this easily weaponizable by attackers with basic SQL injection knowledge.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: https://www.sourcecodester.com/
Restart Required: No
Instructions:
1. Check vendor website for updates 2. Apply any available patches 3. Test functionality after patching
🔧 Temporary Workarounds
Input Validation Filter
allAdd server-side validation to sanitize the 'id' parameter before processing
Implement parameterized queries or prepared statements in PHP code
Web Application Firewall
allDeploy WAF rules to block SQL injection patterns targeting /Master.php
Configure WAF to block requests containing SQL keywords in id parameter
🧯 If You Can't Patch
- Isolate the system behind a firewall with strict access controls
- Implement network segmentation to limit database server access
🔍 How to Verify
Check if Vulnerable:
Test the /Master.php?f=save_student endpoint with SQL injection payloads in the id parameter
Check Version:
Check application version in admin panel or configuration files
Verify Fix Applied:
Verify that SQL injection attempts no longer succeed and return appropriate error messages
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL error messages in application logs
- Multiple failed login attempts following SQL injection patterns
- Unexpected database queries from web server
Network Indicators:
- HTTP requests to /Master.php with SQL keywords in parameters
- Unusual database traffic patterns from web server
SIEM Query:
source="web_logs" AND uri="/Master.php" AND (param="id" AND value CONTAINS "UNION" OR value CONTAINS "SELECT" OR value CONTAINS "OR 1=1")
🔗 References
- https://reports.kunull.net/CVEs/2024/CVE-2024-6731
- https://vuldb.com/?ctiid.271449
- https://vuldb.com/?id.271449
- https://vuldb.com/?submit.374362
- https://www.sourcecodester.com/
- https://reports-kunull.vercel.app/CVE%20research/2024/cve-2024-6731
- https://vuldb.com/?ctiid.271449
- https://vuldb.com/?id.271449
- https://vuldb.com/?submit.374362