CVE-2024-33408

9.8 CRITICAL

📋 TL;DR

A SQL injection vulnerability in campcodes Complete Web-Based School Management System 1.0 allows attackers to execute arbitrary SQL commands via the id parameter in /model/get_classroom.php. This affects all deployments of version 1.0, potentially enabling data theft, modification, or system compromise.

💻 Affected Systems

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

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise leading to data exfiltration, authentication bypass, remote code execution, and complete system takeover.

🟠

Likely Case

Unauthorized data access and modification, including student records, grades, and administrative data.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only read access to non-sensitive data.

🌐 Internet-Facing: HIGH - Web application directly exposed to internet with unauthenticated SQL injection.
🏢 Internal Only: HIGH - Even internal systems vulnerable to insider threats or lateral movement.

🎯 Exploit Status

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

Simple SQL injection via GET parameter. 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 upgrading to a newer version if available, or implement workarounds.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify /model/get_classroom.php to use prepared statements and validate id parameter

Replace vulnerable code with: $stmt = $conn->prepare('SELECT * FROM classrooms WHERE id = ?'); $stmt->bind_param('i', $_GET['id']); $stmt->execute();

Web Application Firewall (WAF) Rules

all

Deploy WAF rules to block SQL injection patterns

ModSecurity rule: SecRule ARGS:id "@detectSQLi" "id:1001,phase:2,deny,status:403,msg:'SQL Injection Attempt'"

🧯 If You Can't Patch

  • Implement network segmentation to isolate the system from sensitive networks
  • Deploy database monitoring to detect unusual SQL queries and access patterns

🔍 How to Verify

Check if Vulnerable:

Test /model/get_classroom.php?id=1' OR '1'='1 and observe if SQL error or unexpected data returned

Check Version:

Check application version in admin panel or readme files

Verify Fix Applied:

Test with same payload after fix - should return error page or no data without SQL errors

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /model/get_classroom.php with SQL-like parameters

Network Indicators:

  • HTTP requests containing SQL keywords (UNION, SELECT, etc.) in id parameter

SIEM Query:

source="web_logs" AND uri="/model/get_classroom.php" AND (query="*UNION*" OR query="*SELECT*" OR query="*OR '1'='1*")

🔗 References

📤 Share & Export