CVE-2024-5047

7.3 HIGH

📋 TL;DR

This critical vulnerability in SourceCodester Student Management System 1.0 allows attackers to upload arbitrary files via the photo parameter in /student/controller.php. This can lead to remote code execution or system compromise. All users running the affected version are vulnerable.

💻 Affected Systems

Products:
  • SourceCodester Student Management System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the web application component; underlying OS doesn't matter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system takeover, data theft, ransomware deployment, or creation of persistent backdoors.

🟠

Likely Case

Webshell upload allowing unauthorized access, data exfiltration, or use as pivot point for internal network attacks.

🟢

If Mitigated

File uploads blocked or properly validated, limiting impact to denial of service or failed attack attempts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit available on GitHub; simple HTTP POST with malicious file.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Web Application Firewall Rule

all

Block file uploads to /student/controller.php or restrict allowed file types

WAF specific - configure to block .php, .jsp, .asp, .exe uploads via photo parameter

File Upload Validation

all

Implement server-side file type validation and rename uploaded files

Modify controller.php to validate file extensions and MIME types

🧯 If You Can't Patch

  • Remove or restrict access to /student/controller.php endpoint
  • Implement network segmentation to isolate the vulnerable system

🔍 How to Verify

Check if Vulnerable:

Attempt to upload a test file (e.g., test.php) via POST to /student/controller.php with photo parameter

Check Version:

Check application version in admin panel or source code headers

Verify Fix Applied:

Verify file upload validation rejects malicious file types and renames uploaded files

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /student/controller.php
  • POST requests with executable file extensions in photo parameter

Network Indicators:

  • HTTP POST to /student/controller.php with file uploads
  • Subsequent connections to uploaded malicious files

SIEM Query:

source="web_logs" AND uri="/student/controller.php" AND method="POST" AND (file_extension="php" OR file_extension="jsp" OR file_extension="asp")

🔗 References

📤 Share & Export