CVE-2024-8223
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Music Gallery Site 1.0 allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in the /classes/Master.php?f=delete_category endpoint. This can lead to data theft, modification, or deletion. All users running the vulnerable version are affected.
💻 Affected Systems
- SourceCodester Music Gallery Site
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data exfiltration, data destruction, or potential remote code execution if database functions allow it.
Likely Case
Unauthorized access to sensitive data (user credentials, personal information), data manipulation, or denial of service.
If Mitigated
Limited impact if proper input validation and parameterized queries are implemented, though some risk remains.
🎯 Exploit Status
Exploit details are publicly available on GitHub, making this easily exploitable by attackers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: https://www.sourcecodester.com/
Restart Required: No
Instructions:
No official patch available. Consider removing the software or implementing workarounds.
🔧 Temporary Workarounds
Input Validation and Sanitization
allImplement strict input validation and parameterized queries for the 'id' parameter in Master.php.
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection rules to block malicious requests.
🧯 If You Can't Patch
- Disable or restrict access to the /classes/Master.php endpoint via web server configuration.
- Implement network segmentation and strict access controls to limit exposure.
🔍 How to Verify
Check if Vulnerable:
Check if the file /classes/Master.php exists and contains the vulnerable delete_category function with unsanitized 'id' parameter.
Check Version:
Check the software version in the application's configuration or documentation.
Verify Fix Applied:
Verify that input validation and parameterized queries are implemented for the 'id' parameter.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Multiple requests to /classes/Master.php?f=delete_category with suspicious 'id' values
Network Indicators:
- HTTP requests containing SQL injection payloads in the 'id' parameter
SIEM Query:
source="web_logs" AND uri="/classes/Master.php" AND query_string="*f=delete_category*" AND (query_string="*id=*'*" OR query_string="*id=*%27*")