CVE-2024-4915
📋 TL;DR
This critical SQL injection vulnerability in Campcodes Online Examination System 1.0 allows attackers to manipulate database queries through the 'id' parameter in result.php. Remote attackers can potentially access, modify, or delete sensitive examination data. All users running the vulnerable version are affected.
💻 Affected Systems
- Campcodes Online Examination System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including student records, exam results, administrative credentials, and potential system takeover.
Likely Case
Data exfiltration of sensitive student information and exam results, with possible data manipulation.
If Mitigated
Limited impact with proper input validation and database permissions restricting unauthorized access.
🎯 Exploit Status
Public exploit code available on GitHub. SQL injection via 'id' parameter requires minimal technical skill.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None found
Restart Required: No
Instructions:
No official patch available. Consider replacing with alternative software or implementing custom fixes.
🔧 Temporary Workarounds
Input Validation and Parameterized Queries
allModify result.php to use prepared statements and validate/sanitize the 'id' parameter
Replace SQL queries with PDO or mysqli prepared statements
Add input validation: if(!is_numeric($_GET['id'])) { die('Invalid input'); }
Web Application Firewall (WAF)
allDeploy WAF rules to block SQL injection patterns
Configure WAF to block SQL injection patterns in URL parameters
Add rule: SecRule ARGS:id "@detectSQLi" "id:1001,phase:2,deny"
🧯 If You Can't Patch
- Isolate the system behind a firewall with strict access controls
- Implement database-level protections: restrict user permissions, enable logging
🔍 How to Verify
Check if Vulnerable:
Test result.php?id=1' OR '1'='1 to see if SQL error appears
Check Version:
Check system documentation or admin panel for version information
Verify Fix Applied:
Test with SQL injection payloads and verify proper error handling
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in web server logs
- Multiple requests to result.php with special characters in id parameter
Network Indicators:
- SQL injection patterns in HTTP requests
- Unusual database query patterns
SIEM Query:
source="web_logs" AND uri="*result.php*" AND (query="*' OR*" OR query="*UNION*" OR query="*SELECT*FROM*")
🔗 References
- https://github.com/yylmm/CVE/blob/main/Online%20Examination%20System%20With%20Timer/SQL_result.md
- https://vuldb.com/?ctiid.264450
- https://vuldb.com/?id.264450
- https://vuldb.com/?submit.333408
- https://github.com/yylmm/CVE/blob/main/Online%20Examination%20System%20With%20Timer/SQL_result.md
- https://vuldb.com/?ctiid.264450
- https://vuldb.com/?id.264450
- https://vuldb.com/?submit.333408