CVE-2024-7375
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Simple Realtime Quiz System 1.0 allows attackers to execute arbitrary SQL commands via the 'quiz' parameter in /my_quiz_result.php. Attackers can potentially steal, modify, or delete database contents including user credentials and quiz data. All deployments of this specific software version are affected.
💻 Affected Systems
- SourceCodester Simple Realtime Quiz System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise leading to data theft, data destruction, and potential server takeover via SQL injection to RCE chaining.
Likely Case
Unauthorized access to sensitive quiz data, user information extraction, and potential privilege escalation.
If Mitigated
Limited impact with proper input validation and database permissions, potentially only error messages or partial data exposure.
🎯 Exploit Status
Public exploit code is available in the GitHub gist reference. SQL injection is straightforward with standard payloads.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
No official patch available. Consider implementing input validation and parameterized queries manually or replacing the software.
🔧 Temporary Workarounds
Input Validation Filter
allAdd server-side validation to sanitize the 'quiz' parameter before processing
Edit /my_quiz_result.php to add input validation using PHP's filter_var() or custom sanitization
Web Application Firewall Rule
allBlock SQL injection patterns targeting the vulnerable endpoint
Add WAF rule to block requests containing SQL keywords to /my_quiz_result.php
🧯 If You Can't Patch
- Isolate the system behind a firewall with strict access controls
- Implement network segmentation to limit database access from the web server
🔍 How to Verify
Check if Vulnerable:
Test the /my_quiz_result.php endpoint with SQL injection payloads like ' OR '1'='1 in the quiz parameter
Check Version:
Check software version in admin panel or configuration files
Verify Fix Applied:
Test with the same payloads and verify no SQL errors or unexpected data is returned
📡 Detection & Monitoring
Log Indicators:
- SQL syntax errors in web server logs
- Unusual database queries from web application
- Multiple failed login attempts following SQL errors
Network Indicators:
- HTTP requests to /my_quiz_result.php containing SQL keywords
- Unusual database port traffic from web server
SIEM Query:
source="web_logs" AND uri="/my_quiz_result.php" AND (query="*OR*" OR query="*UNION*" OR query="*SELECT*" OR query="*INSERT*")