CVE-2018-6863

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to execute arbitrary SQL commands through the login parameter in Select Your College Script 2.0.2. It affects all systems running this specific PHP script version. Attackers can bypass authentication, extract sensitive data, or take control of the database.

💻 Affected Systems

Products:
  • PHP Scripts Mall Select Your College Script
Versions: 2.0.2
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects this specific script version. Requires PHP environment with database connectivity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, authentication bypass, privilege escalation, and potential remote code execution through database functions.

🟠

Likely Case

Authentication bypass allowing unauthorized access to the application, followed by data extraction and potential manipulation of college selection records.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection, though authentication mechanisms may still be bypassed.

🌐 Internet-Facing: HIGH - The login parameter is typically exposed to internet users, making exploitation trivial for attackers.
🏢 Internal Only: MEDIUM - Internal users could exploit this to escalate privileges or access unauthorized data, though attack surface is smaller.

🎯 Exploit Status

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

Exploit code is publicly available and requires minimal technical skill to execute. The login page is typically accessible without authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Check vendor website for updated version
2. Replace vulnerable files with patched versions
3. Test application functionality after update

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement server-side validation and sanitization of login parameters

// PHP example: Use prepared statements
$stmt = $conn->prepare('SELECT * FROM users WHERE username = ? AND password = ?');
$stmt->bind_param('ss', $username, $password);

Web Application Firewall Rules

all

Deploy WAF with SQL injection detection rules

# Example ModSecurity rule
SecRule ARGS "@detectSQLi" "id:1001,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Implement network segmentation to isolate the vulnerable system from sensitive databases
  • Deploy database monitoring to detect unusual SQL queries and login attempts

🔍 How to Verify

Check if Vulnerable:

Test login page with SQL injection payloads like ' OR '1'='1 in username/password fields

Check Version:

Check script files for version information or consult vendor documentation

Verify Fix Applied:

Attempt SQL injection after implementing parameterized queries and verify proper error handling

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL syntax in login attempts
  • Multiple failed login attempts with SQL keywords
  • Database error messages in application logs

Network Indicators:

  • HTTP POST requests to login page containing SQL keywords
  • Unusually long parameter values in login requests

SIEM Query:

source="web_logs" AND (url_path="/login.php" OR url_path="/admin/login.php") AND (request_body CONTAINS "' OR" OR request_body CONTAINS "UNION SELECT" OR request_body CONTAINS "--")

🔗 References

📤 Share & Export