CVE-2024-24141

9.8 CRITICAL

📋 TL;DR

CVE-2024-24141 is a critical SQL injection vulnerability in the School Task Manager App 1.0 that allows attackers to execute arbitrary SQL commands via the 'task' parameter. This affects all users running the vulnerable version of this application, potentially leading to complete database compromise.

💻 Affected Systems

Products:
  • Sourcecodester School Task Manager App
Versions: 1.0
Operating Systems: All operating systems running PHP/MySQL web servers
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of version 1.0 regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution if database functions allow it.

🟠

Likely Case

Unauthorized data access and extraction, including sensitive student/teacher information, grades, and personal data stored in the database.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - Web applications exposed to the internet are directly accessible to attackers.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability.

🎯 Exploit Status

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

Public proof-of-concept available on GitHub demonstrates exploitation. SQL injection via URL parameter requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Unknown

Restart Required: No

Instructions:

No official patch available. Consider replacing with alternative software or implementing custom fixes.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement server-side input validation and sanitization for the 'task' parameter

Modify PHP code to use prepared statements: $stmt = $conn->prepare('SELECT * FROM tasks WHERE id = ?'); $stmt->bind_param('i', $task_id);

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Configure WAF to block requests containing SQL keywords in 'task' parameter

🧯 If You Can't Patch

  • Isolate the application behind a reverse proxy with strict input filtering
  • Implement network segmentation to limit database access from the application server

🔍 How to Verify

Check if Vulnerable:

Test the 'task' parameter with SQL injection payloads like: /page.php?task=1' OR '1'='1

Check Version:

Check application files for version information or README documentation

Verify Fix Applied:

Test with SQL injection payloads after implementing parameterized queries; should return error or no data

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts following SQL injection patterns
  • Unusual database queries from application user

Network Indicators:

  • HTTP requests containing SQL keywords in URL parameters
  • Unusual database port traffic from web server

SIEM Query:

source=web_logs AND (url="*task=*'*" OR url="*task=*%27*")

🔗 References

📤 Share & Export