CVE-2023-49970

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Customer Support System v1 allows attackers to execute arbitrary SQL commands via the subject parameter in the save_ticket function. This affects all deployments of Customer Support System v1 that haven't been patched or secured, potentially leading to complete database compromise.

💻 Affected Systems

Products:
  • Customer Support System
Versions: v1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable as the code uses unsanitized user input directly in SQL queries.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized access to sensitive customer support data, ticket manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible via web interface and requires no authentication.
🏢 Internal Only: MEDIUM - Internal users could exploit but external threat is higher due to unauthenticated access.

🎯 Exploit Status

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

Public exploit code exists on GitHub, making exploitation trivial for attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch exists. Implement parameterized queries in /customer_support/ajax.php around the save_ticket function, specifically for the subject parameter.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the subject parameter before processing

Edit /customer_support/ajax.php and add: $subject = mysqli_real_escape_string($conn, $_POST['subject']);

Web Application Firewall Rule

all

Block SQL injection patterns at the subject parameter

WAF rule: Block requests containing SQL keywords like UNION, SELECT, INSERT, DELETE, DROP in subject parameter

🧯 If You Can't Patch

  • Block external access to /customer_support/ajax.php via firewall rules
  • Implement strict input validation at the application layer for all user inputs

🔍 How to Verify

Check if Vulnerable:

Test by sending SQL injection payload in subject parameter: POST to /customer_support/ajax.php?action=save_ticket with subject=' OR '1'='1

Check Version:

Check source code for version information in comments or configuration files

Verify Fix Applied:

Test with same SQL injection payload - should return error or sanitized response without executing SQL

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts following SQL injection patterns
  • Unusual database queries from web server IP

Network Indicators:

  • HTTP POST requests to /customer_support/ajax.php containing SQL keywords in parameters
  • Unusual database port traffic from web server

SIEM Query:

source="web_logs" AND uri="/customer_support/ajax.php" AND (param="subject" AND value MATCHES "(?i)(union|select|insert|delete|drop|or|and)")

🔗 References

📤 Share & Export