CVE-2024-7372

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Simple Realtime Quiz System 1.0 allows attackers to execute arbitrary SQL commands via the 'quiz' parameter in /quiz_board.php. Attackers can potentially access, modify, or delete database content, including sensitive user data. Any organization using this specific quiz system version is affected.

💻 Affected Systems

Products:
  • SourceCodester Simple Realtime Quiz System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with /quiz_board.php accessible and the vulnerable parameter exposed

📦 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 RCE chaining

🟠

Likely Case

Unauthorized access to quiz data, user information, and potential privilege escalation within the application

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-sensitive data

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code available on GitHub gist, SQL injection requires minimal technical skill

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider removing the application or implementing workarounds.

🔧 Temporary Workarounds

Input Validation Filter

all

Add parameter validation to sanitize 'quiz' parameter input before SQL processing

Modify /quiz_board.php to validate and sanitize all user inputs using prepared statements

Web Application Firewall Rule

all

Block SQL injection patterns targeting /quiz_board.php

Add WAF rule: deny requests to /quiz_board.php containing SQL keywords in parameters

🧯 If You Can't Patch

  • Block external access to /quiz_board.php using network ACLs or web server configuration
  • Implement database user with minimal privileges (read-only if possible) for the application

🔍 How to Verify

Check if Vulnerable:

Test /quiz_board.php with SQL injection payloads in 'quiz' parameter and observe database errors or unexpected behavior

Check Version:

Check application files or documentation for version 1.0 indication

Verify Fix Applied:

Attempt SQL injection after fixes and confirm proper error handling or parameter rejection

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in application logs
  • Unusual database queries from web server IP
  • Multiple failed parameter validation attempts

Network Indicators:

  • HTTP requests to /quiz_board.php with SQL keywords in parameters
  • Unusual database port traffic from web server

SIEM Query:

source="web_logs" AND uri="/quiz_board.php" AND (param="quiz" AND value CONTAINS "UNION" OR value CONTAINS "SELECT" OR value CONTAINS "OR 1=1")

🔗 References

📤 Share & Export