CVE-2020-24208

9.8 CRITICAL

📋 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

Products:
  • SourceCodester Online Shopping Alphaware
Versions: 1.0
Operating Systems: Any OS running PHP/MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the authentication mechanism and affects all installations of this specific version.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Add 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)

linux

Deploy 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

📤 Share & Export