CVE-2024-54918

9.8 CRITICAL

📋 TL;DR

Kashipara E-learning Management System v1.0 contains a remote code execution vulnerability in the teacher_avatar.php file upload functionality. Attackers can upload malicious files to execute arbitrary code on the server. All systems running this specific version are affected.

💻 Affected Systems

Products:
  • Kashipara E-learning Management System
Versions: v1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the teacher_avatar.php endpoint to be accessible and file upload functionality enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Attackers gain shell access to the web server, potentially accessing sensitive student/teacher data and modifying system files.

🟢

If Mitigated

File uploads are properly validated and restricted, preventing execution of malicious files.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit requires teacher-level access. The GitHub reference contains detailed exploitation steps.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Unknown

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available or implementing workarounds.

🔧 Temporary Workarounds

Restrict File Upload Types

all

Implement strict file type validation for avatar uploads to only allow image formats (jpg, png, gif).

Modify teacher_avatar.php to include: $allowed_types = ['image/jpeg', 'image/png', 'image/gif']; if(!in_array($_FILES['avatar']['type'], $allowed_types)) { die('Invalid file type'); }

Disable teacher_avatar.php

all

Temporarily disable the vulnerable endpoint until a proper fix is implemented.

Rename teacher_avatar.php to teacher_avatar.php.disabled or add exit(); at the beginning of the file

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block malicious file uploads to teacher_avatar.php
  • Restrict access to teacher_avatar.php endpoint using IP whitelisting or authentication requirements

🔍 How to Verify

Check if Vulnerable:

Check if teacher_avatar.php exists and accepts file uploads without proper validation. Test by attempting to upload a PHP file.

Check Version:

Check system documentation or configuration files for version information. Look for version indicators in source code or admin panels.

Verify Fix Applied:

Attempt to upload a PHP file to teacher_avatar.php - it should be rejected. Verify only image files are accepted.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to teacher_avatar.php
  • PHP file uploads in web server logs
  • Multiple failed upload attempts

Network Indicators:

  • POST requests to teacher_avatar.php with file uploads
  • Unusual outbound connections from web server

SIEM Query:

source="web_server" AND uri="/teacher_avatar.php" AND method="POST" AND file_extension="php"

🔗 References

📤 Share & Export