CVE-2024-7221
📋 TL;DR
This vulnerability allows remote attackers to execute SQL injection attacks against the School Log Management System 1.0 by manipulating the ID parameter in the /admin/manage_user.php file. This can lead to unauthorized data access, modification, or deletion. Organizations using this specific software version are affected.
💻 Affected Systems
- SourceCodester/Campcodes School Log Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including extraction of sensitive user data, administrative credentials, and potential system takeover through privilege escalation.
Likely Case
Unauthorized access to user data, modification of user permissions, or deletion of log records.
If Mitigated
Limited impact with proper input validation and database permissions restricting damage to non-critical data.
🎯 Exploit Status
Exploit requires access to admin interface but SQL injection is straightforward once authenticated
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None known
Restart Required: No
Instructions:
No official patch available. Consider alternative solutions or implement workarounds.
🔧 Temporary Workarounds
Input Validation Filter
allAdd parameter validation to sanitize ID input before SQL query execution
Modify /admin/manage_user.php to validate ID parameter as integer using is_numeric() or similar
Web Application Firewall
allDeploy WAF with SQL injection protection rules
🧯 If You Can't Patch
- Isolate the system behind a firewall with strict access controls
- Implement database user with minimal required permissions
🔍 How to Verify
Check if Vulnerable:
Test the /admin/manage_user.php endpoint with SQL injection payloads in the ID parameter
Check Version:
Check software 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 queries in database logs
- Multiple failed login attempts followed by SQL payloads
Network Indicators:
- HTTP requests to /admin/manage_user.php with SQL injection patterns in parameters
SIEM Query:
web.url:*manage_user.php* AND (web.param:*OR* OR web.param:*UNION* OR web.param:*SELECT*)
🔗 References
- https://gist.github.com/topsky979/1e98c4d1a3ba1ed73aab46d360c1c4b8
- https://vuldb.com/?ctiid.272792
- https://vuldb.com/?id.272792
- https://vuldb.com/?submit.380428
- https://gist.github.com/topsky979/1e98c4d1a3ba1ed73aab46d360c1c4b8
- https://vuldb.com/?ctiid.272792
- https://vuldb.com/?id.272792
- https://vuldb.com/?submit.380428