CVE-2020-24208
📋 TL;DR
This SQL injection vulnerability in SourceCodester Online Shopping Alphaware 1.0 allows remote unauthenticated attackers to bypass authentication by manipulating email and password parameters. Attackers can gain unauthorized access to the application without valid credentials. Any organization running this specific e-commerce software is affected.
💻 Affected Systems
- SourceCodester Online Shopping Alphaware
📦 What is this software?
Online Shopping Alphaware by Online Shopping Alphaware Project
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the application with administrative access, potential data theft of customer information and payment details, and full control over the shopping platform.
Likely Case
Unauthorized access to user accounts, manipulation of orders, theft of personal data, and potential privilege escalation within the application.
If Mitigated
Limited impact with proper input validation and parameterized queries preventing successful exploitation.
🎯 Exploit Status
Multiple public exploit scripts are available that demonstrate authentication bypass via SQL injection in login parameters.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Not available
Vendor Advisory: Not available
Restart Required: No
Instructions:
1. Download the latest version from SourceCodester if available. 2. Replace vulnerable authentication files with properly sanitized versions. 3. Implement parameterized queries for all database interactions.
🔧 Temporary Workarounds
Input Validation and Sanitization
allAdd server-side validation and sanitization for email and password parameters before processing.
Implement PHP filter_var() with FILTER_VALIDATE_EMAIL for email, and mysqli_real_escape_string() or prepared statements for all database queries.
Web Application Firewall (WAF)
linuxDeploy a WAF with SQL injection protection rules to block malicious requests.
Configure ModSecurity with OWASP Core Rule Set: SecRuleEngine On, SecRule ARGS "@detectSQLi" "id:942100,phase:2,deny"
🧯 If You Can't Patch
- Isolate the application behind a reverse proxy with strict input filtering
- Implement network segmentation and restrict access to only necessary users
🔍 How to Verify
Check if Vulnerable:
Test authentication endpoint with SQL injection payloads in email parameter (e.g., admin' OR '1'='1).
Check Version:
Check PHP files for version comments or review application documentation for version information.
Verify Fix Applied:
Attempt the same SQL injection payloads and verify they are rejected or properly sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual authentication attempts with SQL keywords in parameters
- Multiple failed login attempts from single IP with SQL payloads
- Successful logins from unusual locations or IPs
Network Indicators:
- HTTP POST requests to login.php containing SQL injection patterns
- Unusual traffic patterns to authentication endpoints
SIEM Query:
source="web_logs" AND (uri_path="/login.php" OR uri_path="/auth.php") AND (http_method="POST") AND (param_email CONTAINS "' OR" OR param_email CONTAINS "'--" OR param_email CONTAINS "'#")
🔗 References
- https://packetstormsecurity.com/files/158684/Online-Shopping-Alphaware-1.0-SQL-Injection.html
- https://www.exploit-db.com/exploits/48725
- https://www.sourcecodester.com/download-code?nid=14368&title=Online+Shopping+Alphaware+in+PHP%2FMysql
- https://packetstormsecurity.com/files/158684/Online-Shopping-Alphaware-1.0-SQL-Injection.html
- https://www.exploit-db.com/exploits/48725
- https://www.sourcecodester.com/download-code?nid=14368&title=Online+Shopping+Alphaware+in+PHP%2FMysql