CVE-2024-7196

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Complaints Report Management System 1.0 allows attackers to execute arbitrary SQL commands via the username parameter in the /admin/ajax.php?action=login endpoint. Attackers can potentially bypass authentication, access sensitive data, or compromise the database. All deployments of version 1.0 are affected.

💻 Affected Systems

Products:
  • SourceCodester Complaints Report Management System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. The vulnerability exists in the default installation.

📦 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 on the underlying server.

🟠

Likely Case

Authentication bypass allowing unauthorized admin access, followed by data exfiltration and potential system takeover.

🟢

If Mitigated

Limited impact with proper input validation and WAF rules blocking SQL injection patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code is available. The vulnerability requires no authentication and is simple to exploit.

🛠️ 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.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement proper input validation and parameterized queries for the username parameter in /admin/ajax.php

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting the vulnerable endpoint

🧯 If You Can't Patch

  • Restrict access to /admin/ajax.php endpoint using network ACLs or authentication
  • Implement database user with minimal privileges for the application

🔍 How to Verify

Check if Vulnerable:

Test the /admin/ajax.php?action=login endpoint with SQL injection payloads in the username parameter

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and proper input validation is implemented

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts with SQL payloads
  • Access to /admin/ajax.php with suspicious parameters

Network Indicators:

  • HTTP requests to /admin/ajax.php containing SQL keywords in parameters
  • Unusual database connection patterns

SIEM Query:

source="web_logs" AND uri="/admin/ajax.php" AND (param="username" AND value CONTAINS "' OR" OR value CONTAINS "UNION" OR value CONTAINS "SELECT")

🔗 References

📤 Share & Export