CVE-2024-7168

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester School Fees Payment System 1.0 allows attackers to execute arbitrary SQL commands via the 'id' parameter in /manage_user.php. Attackers can potentially access, modify, or delete database contents including sensitive user information. The vulnerability affects all installations of this specific software version.

💻 Affected Systems

Products:
  • SourceCodester School Fees Payment System
Versions: 1.0
Operating Systems: All platforms running PHP
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, data destruction, authentication bypass, and potential remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized access to sensitive student/payment data, privilege escalation, and potential system takeover.

🟢

If Mitigated

Limited impact with proper input validation and database permission restrictions, potentially only allowing data viewing.

🌐 Internet-Facing: HIGH - The vulnerability can be exploited remotely without authentication, making internet-facing instances extremely vulnerable.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require network access, reducing exposure to external attackers.

🎯 Exploit Status

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

Public exploit code is available, making exploitation trivial for attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider replacing with alternative software or implementing custom fixes with proper input validation and parameterized queries.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block exploitation attempts.

Input Validation Filter

linux

Add input validation to sanitize the 'id' parameter before processing.

Add PHP code: $id = filter_var($_GET['id'], FILTER_VALIDATE_INT); if($id === false) { die('Invalid input'); }

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict network segmentation and monitor all database access attempts

🔍 How to Verify

Check if Vulnerable:

Test the /manage_user.php endpoint with SQL injection payloads like: /manage_user.php?id=1' OR '1'='1

Check Version:

Check the software version in the admin panel or configuration files

Verify Fix Applied:

Test with SQL injection payloads and verify they are rejected or sanitized properly

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple failed login attempts or parameter manipulation in /manage_user.php

Network Indicators:

  • SQL injection patterns in HTTP requests to /manage_user.php
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri="/manage_user.php" AND (query CONTAINS "' OR" OR query CONTAINS "UNION" OR query CONTAINS "SELECT" FROM)

🔗 References

📤 Share & Export