CVE-2020-25905

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Sourcecodester Mobile Shop System 1.0 allows attackers to execute arbitrary SQL commands via the email parameter in login pages. Attackers can potentially bypass authentication, access sensitive data, or compromise the database server. Any organization using this specific PHP/MySQL e-commerce system is affected.

💻 Affected Systems

Products:
  • Sourcecodester Mobile Shop System
Versions: 1.0
Operating Systems: Any OS running PHP/MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: Affects both login.php and LoginAsAdmin.php files. Requires PHP/MySQL environment.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, authentication bypass, remote code execution on the database server, and potential full system takeover.

🟠

Likely Case

Authentication bypass allowing unauthorized admin access, extraction of user credentials and sensitive customer data, and potential data manipulation.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection, though other vulnerabilities may still exist.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Multiple public exploit scripts available. Simple SQL injection via email parameter requires no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

1. Download latest version if available from Sourcecodester. 2. Replace vulnerable files (login.php, LoginAsAdmin.php). 3. Implement parameterized queries. 4. Validate and sanitize all user inputs.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add input validation to email parameter to reject SQL injection attempts

Modify PHP files to validate email format and sanitize input

Web Application Firewall (WAF)

all

Deploy WAF with SQL injection rules to block malicious requests

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement network segmentation to limit database server exposure

🔍 How to Verify

Check if Vulnerable:

Test email parameter with SQL injection payloads like ' OR '1'='1

Check Version:

Check PHP files for version information or compare with original 1.0 release

Verify Fix Applied:

Attempt SQL injection tests and verify they are blocked or sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts with SQL-like patterns
  • Admin login from unexpected IP addresses

Network Indicators:

  • HTTP POST requests with SQL keywords in email parameter
  • Unusual database connection patterns

SIEM Query:

source="web_logs" AND (email="*OR*" OR email="*UNION*" OR email="*SELECT*")

🔗 References

📤 Share & Export