CVE-2024-7164

7.3 HIGH

📋 TL;DR

This is a critical SQL injection vulnerability in SourceCodester School Fees Payment System 1.0 that allows attackers to manipulate database queries via the username parameter in the login function. Attackers can potentially access, modify, or delete sensitive data including student payment records and credentials. All deployments of version 1.0 are affected.

💻 Affected Systems

Products:
  • SourceCodester School Fees Payment System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable by default. No special configuration required for exploitation.

📦 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 via database functions.

🟠

Likely Case

Unauthorized access to sensitive student payment data, credential theft, and potential system takeover through admin account compromise.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code is available, making this easily weaponizable. Attack requires no authentication and minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

1. Check vendor website for updates
2. If no patch available, implement workarounds
3. Consider replacing with alternative software

🔧 Temporary Workarounds

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting /ajax.php?action=login

Depends on specific WAF platform

Input Validation Filter

all

Implement server-side input validation for username parameter

Modify ajax.php to sanitize username input using prepared statements

🧯 If You Can't Patch

  • Isolate the system behind a reverse proxy with strict input validation
  • Implement network segmentation to limit database access from the application server

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

Check application files or documentation for version information

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and return proper error handling

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts with SQL syntax
  • Requests to /ajax.php?action=login with special characters

Network Indicators:

  • SQL error messages in HTTP responses
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/ajax.php" AND query="action=login" AND (username CONTAINS "'" OR username CONTAINS "--" OR username CONTAINS "#")

🔗 References

📤 Share & Export