CVE-2023-24204

5.4 MEDIUM

📋 TL;DR

This SQL injection vulnerability in Simple Customer Relationship Management System v1.0 allows attackers to execute arbitrary SQL commands via the name parameter in get-quote.php. This can lead to unauthorized data access, modification, or deletion. Organizations using this specific version of the software are affected.

💻 Affected Systems

Products:
  • SourceCodester Simple Customer Relationship Management System
Versions: v1.0
Operating Systems: Any OS running PHP and MySQL/MariaDB
Default Config Vulnerable: ⚠️ Yes
Notes: Affects default installations; requires PHP and database backend

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or remote code execution if database functions allow it

🟠

Likely Case

Unauthorized access to customer data, potential privilege escalation, and data manipulation

🟢

If Mitigated

Limited impact with proper input validation and database permissions in place

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Simple SQL injection via GET parameter; public exploit code available

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch available. Consider upgrading to newer version if available or implementing workarounds.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add parameterized queries or proper input validation to get-quote.php

Modify get-quote.php to use prepared statements: $stmt = $conn->prepare('SELECT * FROM quotes WHERE name = ?'); $stmt->bind_param('s', $name);

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Add WAF rule: SecRule ARGS:name "@detectSQLi" "id:1001,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Disable or remove get-quote.php if not required
  • Implement network segmentation to restrict database access

🔍 How to Verify

Check if Vulnerable:

Test get-quote.php with SQL injection payloads: get-quote.php?name=' OR '1'='1

Check Version:

Check software version in admin panel or readme files

Verify Fix Applied:

Test with same payloads; should return error or no data instead of executing SQL

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts from single IP
  • GET requests to get-quote.php with SQL keywords

Network Indicators:

  • Unusual database port traffic from web server
  • SQL error messages in HTTP responses

SIEM Query:

source="web_logs" AND uri="/get-quote.php" AND (query="*OR*" OR query="*UNION*" OR query="*SELECT*" OR query="*--*" OR query="*;*")

🔗 References

📤 Share & Export