CVE-2023-6651
📋 TL;DR
This critical SQL injection vulnerability in Matrimonial Site 1.0 allows remote attackers to execute arbitrary SQL commands via the username parameter in the auth.php endpoint. Attackers can potentially access, modify, or delete database content, including sensitive user information. All deployments of Matrimonial Site 1.0 with the vulnerable auth.php file are affected.
💻 Affected Systems
- Matrimonial Site System
📦 What is this software?
Matrimonial Site by Carmelogarcia
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise leading to data theft, data destruction, authentication bypass, and potential remote code execution if database functions allow it.
Likely Case
Unauthorized access to sensitive user data (personal information, credentials), database manipulation, and potential privilege escalation.
If Mitigated
Limited impact with proper input validation and parameterized queries preventing SQL injection, though other vulnerabilities may still exist.
🎯 Exploit Status
Exploit details are publicly available in GitHub repositories, making this easily weaponizable by attackers with basic SQL injection knowledge.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None known
Restart Required: No
Instructions:
No official patch available. Implement workarounds or migrate to a different platform. If source code is available, manually fix the SQL injection vulnerability in auth.php by implementing parameterized queries.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection protection rules to block malicious requests to auth.php
Input Validation Filter
allImplement server-side input validation to reject suspicious characters in username parameter
🧯 If You Can't Patch
- Block external access to /auth/auth.php via firewall rules or web server configuration
- Implement network segmentation to isolate the vulnerable system from sensitive data
🔍 How to Verify
Check if Vulnerable:
Test the auth.php endpoint with SQL injection payloads in the username parameter (e.g., ' OR '1'='1) and observe database errors or unexpected behavior
Check Version:
Check the software version in the application interface or configuration files
Verify Fix Applied:
After implementing fixes, test with the same SQL injection payloads to confirm they are properly rejected or sanitized
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL syntax in username parameter in web server logs
- Multiple failed authentication attempts with SQL-like patterns
- Database error messages in application logs
Network Indicators:
- HTTP requests to /auth/auth.php containing SQL keywords (UNION, SELECT, INSERT, etc.) in parameters
- Unusual database connection patterns from web server
SIEM Query:
source="web_server" AND uri="/auth/auth.php" AND (username="*UNION*" OR username="*SELECT*" OR username="*INSERT*" OR username="*DELETE*")
🔗 References
- https://github.com/850362564/BugHub/blob/main/Matrimonial%20Site%20System%20auth.php%20has%20Sqlinjection.pdf
- https://vuldb.com/?ctiid.247344
- https://vuldb.com/?id.247344
- https://github.com/850362564/BugHub/blob/main/Matrimonial%20Site%20System%20auth.php%20has%20Sqlinjection.pdf
- https://vuldb.com/?ctiid.247344
- https://vuldb.com/?id.247344