CVE-2024-24320
📋 TL;DR
This directory traversal vulnerability in Mgt-commerce CloudPanel allows authenticated attackers to read arbitrary files and execute code via the service parameter. It affects CloudPanel versions 2.0.0 through 2.4.0. Attackers can potentially access sensitive information and gain remote code execution.
💻 Affected Systems
- Mgt-commerce CloudPanel
📦 What is this software?
Cloudpanel by Mgt Commerce
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise with remote code execution, data exfiltration, and lateral movement within the network.
Likely Case
Unauthorized file access leading to credential theft, configuration exposure, and potential privilege escalation.
If Mitigated
Limited impact with proper network segmentation, strong authentication, and file system permissions restricting traversal.
🎯 Exploit Status
Exploitation requires authenticated access but is straightforward once credentials are obtained.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v2.4.1 or later
Vendor Advisory: https://www.cloudpanel.io/docs/v2/security/
Restart Required: Yes
Instructions:
1. Backup your configuration and data. 2. Update CloudPanel to version 2.4.1 or later using the official update mechanism. 3. Restart the CloudPanel service. 4. Verify the update was successful.
🔧 Temporary Workarounds
Restrict Access to CloudPanel
linuxLimit CloudPanel access to trusted IP addresses only using firewall rules.
iptables -A INPUT -p tcp --dport 8443 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 8443 -j DROP
Implement Web Application Firewall
allDeploy a WAF with directory traversal protection rules to block exploitation attempts.
🧯 If You Can't Patch
- Implement strict network segmentation to isolate CloudPanel instances from critical systems.
- Enforce strong authentication policies and monitor for suspicious login attempts.
🔍 How to Verify
Check if Vulnerable:
Check CloudPanel version via admin interface or configuration files. Versions 2.0.0-2.4.0 are vulnerable.
Check Version:
grep -i version /opt/cloudpanel/version.txt || cloudpanel --version
Verify Fix Applied:
Verify CloudPanel version is 2.4.1 or later and test the load-logfiles function with traversal attempts.
📡 Detection & Monitoring
Log Indicators:
- Unusual file access patterns in CloudPanel logs
- Multiple failed authentication attempts followed by load-logfiles requests
Network Indicators:
- HTTP requests to load-logfiles with ../ sequences in parameters
SIEM Query:
source="cloudpanel.log" AND (uri="/load-logfiles" AND service CONTAINS "../")