CVE-2024-12945
📋 TL;DR
A critical SQL injection vulnerability in Simple Car Rental System 1.0 allows attackers to execute arbitrary SQL commands via the email/pass parameters in account.php. This affects all deployments of this software version. Remote attackers can potentially access, modify, or delete database contents.
💻 Affected Systems
- Simple Car Rental System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise leading to data theft, authentication bypass, privilege escalation, and potential remote code execution if database functions allow it.
Likely Case
Unauthorized access to sensitive data including user credentials, personal information, and rental records.
If Mitigated
Limited impact with proper input validation, parameterized queries, and database permissions restricting damage to non-critical data.
🎯 Exploit Status
Exploit details are publicly available on GitHub. SQL injection via login parameters is a well-understood attack vector with many automated tools available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: https://code-projects.org/
Restart Required: No
Instructions:
1. Check vendor website for updated version. 2. If no patch available, implement parameterized queries in account.php. 3. Replace direct user input concatenation with prepared statements. 4. Validate and sanitize all email and password inputs.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection protection rules to block malicious requests.
Input Validation Filter
linuxAdd input validation to reject SQL special characters in email and password fields.
Add PHP validation: if(preg_match('/[\'"\;\-\-]/', $input)) { reject input; }
🧯 If You Can't Patch
- Isolate the system behind a reverse proxy with strict input filtering
- Implement network segmentation to limit database access from the web server
🔍 How to Verify
Check if Vulnerable:
Test account.php with SQL injection payloads like ' OR '1'='1 in email/password fields and observe database errors or unexpected behavior.
Check Version:
Check PHP files for version comments or compare file hashes with known vulnerable version.
Verify Fix Applied:
Attempt SQL injection tests after fixes. Successful fixes should return generic login failure messages without database errors.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL syntax in URL parameters
- Multiple failed login attempts with SQL patterns
- Database error messages in web server logs
Network Indicators:
- HTTP POST requests to account.php containing SQL keywords like UNION, SELECT, OR, --
SIEM Query:
source="web_logs" url="*account.php*" ("' OR" OR "UNION SELECT" OR ";--" OR "1=1")