CVE-2024-6067

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Music Class Enrollment System 1.0 allows attackers to manipulate database queries through the 'id' parameter in the /mces/?p=class/view_class endpoint. Attackers can potentially read, modify, or delete database contents, and the vulnerability can be exploited remotely without authentication. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • SourceCodester Music Class Enrollment System
Versions: 1.0
Operating Systems: All platforms running the web application
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and configuration of version 1.0.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, privilege escalation to administrative access, and potential remote code execution if database configuration permits.

🟠

Likely Case

Unauthorized data access, data exfiltration, and potential authentication bypass leading to unauthorized system access.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and network segmentation preventing database access.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and affects a web application endpoint, making internet-facing instances particularly vulnerable.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but have reduced attack surface compared to internet-facing instances.

🎯 Exploit Status

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

Public exploit code is available on GitHub, making exploitation straightforward 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 implementing input validation and parameterized queries manually, or replace with alternative software.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Implement WAF rules to block SQL injection patterns targeting the /mces/?p=class/view_class endpoint with id parameter manipulation.

Input Validation Filter

all

Add server-side input validation to sanitize the 'id' parameter, allowing only numeric values.

🧯 If You Can't Patch

  • Isolate the vulnerable system behind a reverse proxy with strict input validation
  • Implement network segmentation to restrict database access from the web application server

🔍 How to Verify

Check if Vulnerable:

Test the /mces/?p=class/view_class endpoint with SQL injection payloads in the id parameter (e.g., id=1' OR '1'='1). Monitor for database errors or unexpected responses.

Check Version:

Check the application's version information in the admin panel or configuration files. The vulnerable version is 1.0.

Verify Fix Applied:

After implementing fixes, retest with SQL injection payloads to ensure they are properly blocked or sanitized without affecting legitimate functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple requests to /mces/?p=class/view_class with suspicious id parameter values
  • Database query errors containing SQL syntax

Network Indicators:

  • HTTP requests with SQL keywords in URL parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND url="/mces/?p=class/view_class" AND (param="id" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|or|and|'|--|#|;)")

🔗 References

📤 Share & Export