CVE-2023-31843
📋 TL;DR
CVE-2023-31843 is an SQL injection vulnerability in Sourcecodester Faculty Evaluation System v1.0 that allows attackers to execute arbitrary SQL commands via the 'id' parameter in the /eval/admin/view_faculty.php endpoint. This affects all installations of Faculty Evaluation System v1.0, potentially compromising database integrity and confidentiality.
💻 Affected Systems
- Sourcecodester Faculty Evaluation System
📦 What is this software?
Faculty Evaluation System by Faculty Evaluation System Project
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data theft, modification, or deletion; potential authentication bypass leading to administrative access; possible remote code execution if database configuration permits.
Likely Case
Unauthorized data extraction from the database, including sensitive faculty and student information; potential privilege escalation within the application.
If Mitigated
Limited impact with proper input validation and parameterized queries in place; database access restricted to read-only operations.
🎯 Exploit Status
Exploitation requires access to the admin interface; SQL injection is straightforward via the 'id' parameter.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Not available
Vendor Advisory: Not available
Restart Required: No
Instructions:
No official patch available. Implement parameterized queries in /eval/admin/view_faculty.php to sanitize the 'id' parameter input.
🔧 Temporary Workarounds
Web Application Firewall (WAF) Rule
allDeploy WAF rules to block SQL injection patterns targeting the vulnerable endpoint
WAF-specific configuration required
Input Validation Filter
allImplement server-side validation to restrict 'id' parameter to numeric values only
Modify PHP code to validate: if(!is_numeric($_GET['id'])) { die('Invalid input'); }
🧯 If You Can't Patch
- Restrict access to /eval/admin/ directory to authorized IP addresses only
- Disable the vulnerable endpoint if not required for operations
🔍 How to Verify
Check if Vulnerable:
Test the endpoint with SQL injection payloads: /eval/admin/view_faculty.php?id=1' OR '1'='1
Check Version:
Check system documentation or configuration files for version information
Verify Fix Applied:
Verify that SQL injection payloads no longer return database errors or unexpected data
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in application logs
- Multiple requests to /eval/admin/view_faculty.php with suspicious 'id' parameters
Network Indicators:
- HTTP requests containing SQL keywords (SELECT, UNION, etc.) in the 'id' parameter
SIEM Query:
source="web_logs" AND uri="/eval/admin/view_faculty.php" AND (query="*SELECT*" OR query="*UNION*" OR query="*OR*1*1*")