CVE-2024-4907

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/show_student2.php. Remote attackers can potentially access, modify, or delete sensitive student and school data. All users running version 1.0 are affected.

💻 Affected Systems

Products:
  • Campcodes Complete Web-Based School Management System
Versions: 1.0
Operating Systems: Any OS running PHP/MySQL web server
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of version 1.0. The vulnerability is in core application code, not dependent on specific configurations.

📦 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 on the underlying server.

🟠

Likely Case

Unauthorized access to sensitive student records, grades, personal information, and potential privilege escalation within the application.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and public exploit details are available, making internet-facing instances prime targets.
🏢 Internal Only: MEDIUM - Internal attackers could still exploit this, but requires network access and reduces exposure to external threat actors.

🎯 Exploit Status

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

Public exploit details are available in GitHub repositories, making this easily exploitable by attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Input Validation Filter

all

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

Modify /view/show_student2.php to validate grade parameter using PHP filter functions

Web Application Firewall Rules

all

Block SQL injection patterns targeting the vulnerable endpoint

Add WAF rule: deny requests to /view/show_student2.php containing SQL keywords in grade parameter

🧯 If You Can't Patch

  • Isolate the system on a segmented network with strict access controls
  • Implement database-level protections: restrict application database user permissions to minimum required

🔍 How to Verify

Check if Vulnerable:

Test the /view/show_student2.php endpoint with SQL injection payloads in the grade parameter (e.g., grade=1' OR '1'='1)

Check Version:

Check application version in admin panel or readme files

Verify Fix Applied:

Test with SQL injection payloads after implementing fixes - should return error or sanitized response

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /view/show_student2.php with suspicious grade parameters
  • Database query patterns with unexpected UNION or SELECT statements

Network Indicators:

  • HTTP requests containing SQL keywords (UNION, SELECT, INSERT) in URL parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/view/show_student2.php" AND (param="grade" AND value MATCH "'.*[Uu][Nn][Ii][Oo][Nn].*'" OR value MATCH "'.*[Ss][Ee][Ll][Ee][Cc][Tt].*'")

🔗 References

📤 Share & Export