CVE-2023-0917

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in Simple Customer Relationship Management System 1.0 allows attackers to manipulate database queries via the password parameter in the login page. Remote attackers can potentially execute arbitrary SQL commands, leading to data theft, authentication bypass, or system compromise. All users running the affected software version are at risk.

💻 Affected Systems

Products:
  • SourceCodester Simple Customer Relationship Management System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the login.php file specifically. Any deployment using the vulnerable version is affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including credential theft, data exfiltration, privilege escalation to admin, and potential remote code execution on the underlying server.

🟠

Likely Case

Authentication bypass allowing unauthorized access to the CRM system, followed by data theft of customer information and potential lateral movement within the network.

🟢

If Mitigated

Failed login attempts logged, no data access achieved due to proper input validation and parameterized queries in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available on GitHub. SQL injection via login page requires no authentication, making exploitation trivial for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available, or implement workarounds and monitoring.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection rules to block malicious payloads targeting the login.php endpoint.

Input Validation Filter

linux

Add server-side input validation to sanitize the password parameter before processing.

Example PHP: $password = mysqli_real_escape_string($conn, $_POST['password']);

🧯 If You Can't Patch

  • Isolate the CRM system from the internet and restrict access to internal networks only.
  • Implement strict network segmentation and monitor all traffic to/from the CRM server for suspicious SQL patterns.

🔍 How to Verify

Check if Vulnerable:

Test the login.php endpoint with SQL injection payloads in the password field (e.g., ' OR '1'='1). If login succeeds without valid credentials, system is vulnerable.

Check Version:

Check the software version in the application interface or configuration files. Look for version 1.0 in the source code or documentation.

Verify Fix Applied:

After implementing fixes, attempt the same SQL injection tests. Successful login should only occur with valid credentials.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL syntax in login attempts
  • Multiple failed login attempts with SQL keywords
  • Successful logins from unexpected IP addresses

Network Indicators:

  • HTTP POST requests to /php-scrm/login.php containing SQL keywords in parameters
  • Unusual database query patterns from the web server

SIEM Query:

source="web_logs" AND uri="/php-scrm/login.php" AND (password="*OR*" OR password="*UNION*" OR password="*SELECT*")

🔗 References

📤 Share & Export