CVE-2024-5239

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in Campcodes Complete Web-Based School Management System 1.0 allows attackers to manipulate database queries through the 'grade' parameter in /view/timetable_update_form.php. Attackers can potentially read, modify, or delete sensitive school data including student records, grades, and personal information. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • Campcodes Complete Web-Based School Management System
Versions: 1.0
Operating Systems: All platforms running PHP/MySQL web servers
Default Config Vulnerable: ⚠️ Yes
Notes: Requires PHP/MySQL environment. The vulnerable file is part of the core application.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or full system takeover via SQL injection to execute arbitrary commands.

🟠

Likely Case

Unauthorized access to sensitive student and staff data, grade manipulation, or extraction of database credentials.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and public exploit details exist.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to authenticated or network-accessible attacks.

🎯 Exploit Status

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

Exploit details are publicly available in GitHub repositories. Attack requires access to the vulnerable endpoint, which may require authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Implement parameterized queries and input validation in /view/timetable_update_form.php. Consider migrating to a supported, maintained school management system.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests to the vulnerable endpoint.

Input Validation Filter

all

Add server-side validation to sanitize the 'grade' parameter before processing.

// PHP example: filter_var($_POST['grade'], FILTER_SANITIZE_STRING);

🧯 If You Can't Patch

  • Block external access to the system using network firewalls or restrict to trusted IPs only.
  • Disable or remove the /view/timetable_update_form.php file if functionality is not critical.

🔍 How to Verify

Check if Vulnerable:

Test the /view/timetable_update_form.php endpoint with SQL injection payloads in the 'grade' parameter and monitor for database errors or unexpected responses.

Check Version:

Check application documentation or configuration files for version information, typically in README or config.php.

Verify Fix Applied:

Verify that parameterized queries are implemented and test with SQL injection payloads to confirm they are blocked or sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /view/timetable_update_form.php with suspicious parameters
  • Database query anomalies

Network Indicators:

  • HTTP POST requests to /view/timetable_update_form.php containing SQL keywords (UNION, SELECT, etc.) in parameters

SIEM Query:

source="web_logs" AND uri_path="/view/timetable_update_form.php" AND (param="grade" AND value MATCHES "(?i).*UNION.*SELECT.*|.*OR.*1=1.*")

🔗 References

📤 Share & Export