CVE-2023-30415
📋 TL;DR
This SQL injection vulnerability in Packers and Movers Management System v1.0 allows attackers to execute arbitrary SQL commands via the id parameter in /inquiries/view_inquiry.php. This affects all users running the vulnerable version of this web application, potentially leading to complete database compromise.
💻 Affected Systems
- Sourcecodester Packers and Movers Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution if database permissions allow.
Likely Case
Database information disclosure, data manipulation, and potential privilege escalation within the application.
If Mitigated
Limited impact with proper input validation, parameterized queries, and database permission restrictions in place.
🎯 Exploit Status
Public exploit details available. SQL injection via GET parameter requires minimal technical skill to exploit.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None known
Restart Required: No
Instructions:
No official patch available. Consider upgrading to a newer version if available, or implement workarounds.
🔧 Temporary Workarounds
Input Validation and Sanitization
allAdd input validation to ensure id parameter contains only numeric values
Modify /inquiries/view_inquiry.php to validate id parameter: if(!is_numeric($_GET['id'])) { die('Invalid input'); }
Implement Parameterized Queries
allReplace direct SQL concatenation with prepared statements
Replace: $sql = "SELECT * FROM inquiries WHERE id = " . $_GET['id']; with prepared statement using mysqli or PDO
🧯 If You Can't Patch
- Implement web application firewall (WAF) with SQL injection rules
- Restrict access to /inquiries/view_inquiry.php to authorized users only
🔍 How to Verify
Check if Vulnerable:
Test /inquiries/view_inquiry.php?id=1' OR '1'='1 and observe if SQL error or unexpected behavior occurs
Check Version:
Check application version in admin panel or readme files
Verify Fix Applied:
Test with SQL injection payloads after implementing fixes to ensure they are rejected
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in application logs
- Multiple requests to /inquiries/view_inquiry.php with SQL-like payloads
Network Indicators:
- HTTP requests containing SQL keywords (UNION, SELECT, etc.) in id parameter
SIEM Query:
source="web_logs" AND uri="/inquiries/view_inquiry.php" AND (query="*UNION*" OR query="*SELECT*" OR query="*OR '1'='1*")
🔗 References
- http://packetstormsecurity.com/files/174758/Packers-And-Movers-Management-System-1.0-SQL-Injection.html
- https://robsware.github.io/2023/09/01/firstcve
- http://packetstormsecurity.com/files/174758/Packers-And-Movers-Management-System-1.0-SQL-Injection.html
- https://robsware.github.io/2023/09/01/firstcve