CVE-2024-33410

8.1 HIGH

📋 TL;DR

This SQL injection vulnerability in campcodes Complete Web-Based School Management System 1.0 allows attackers to execute arbitrary SQL commands through the id parameter in the /model/delete_range_grade.php endpoint. Attackers can potentially read, modify, or delete database contents, including sensitive student and school data. All deployments of version 1.0 are affected.

💻 Affected Systems

Products:
  • campcodes Complete Web-Based School Management System
Versions: 1.0
Operating Systems: All platforms running PHP and MySQL/MariaDB
Default Config Vulnerable: ⚠️ Yes
Notes: Requires PHP and MySQL/MariaDB database backend. All installations of version 1.0 are vulnerable by default.

📦 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 records, grade manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and database permission restrictions, potentially only error messages or limited data exposure.

🌐 Internet-Facing: HIGH - Web application accessible from internet with unauthenticated SQL injection vulnerability.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to insider threats or compromised internal accounts.

🎯 Exploit Status

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

SQL injection via GET/POST parameter requires minimal technical skill. Public proof-of-concept available in GitHub references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Consider migrating to alternative software or implementing workarounds.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Implement WAF rules to block SQL injection patterns targeting the /model/delete_range_grade.php endpoint and id parameter.

Input Validation Filter

all

Add input validation to only accept numeric values for the id parameter before processing.

<?php
if (!is_numeric($_GET['id']) && !is_numeric($_POST['id'])) {
    die('Invalid input');
}
?>

🧯 If You Can't Patch

  • Block external access to the vulnerable endpoint using firewall rules or web server configuration.
  • Implement database user permission restrictions to limit damage from successful exploitation.

🔍 How to Verify

Check if Vulnerable:

Test the /model/delete_range_grade.php endpoint with SQL injection payloads like ' OR '1'='1 in the id parameter and observe database errors or unexpected behavior.

Check Version:

Check application version in admin panel or review source code for version markers.

Verify Fix Applied:

After implementing workarounds, test with the same SQL injection payloads and verify they are blocked or properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple requests to /model/delete_range_grade.php with suspicious id parameter values
  • Database query patterns showing UNION SELECT or other SQL injection constructs

Network Indicators:

  • HTTP requests containing SQL keywords (SELECT, UNION, etc.) in URL parameters
  • Abnormal traffic patterns to the vulnerable endpoint

SIEM Query:

source="web_logs" AND (url_path="/model/delete_range_grade.php" AND (param="id" AND value MATCH "'.*[Ss][Ee][Ll][Ee][Cc][Tt].*'" OR value MATCH "'.*[Uu][Nn][Ii][Oo][Nn].*'"))

🔗 References

📤 Share & Export