CVE-2023-39964
📋 TL;DR
CVE-2023-39964 is an arbitrary file read vulnerability in 1Panel server management panel that allows attackers to read sensitive configuration files on the server. The vulnerability exists in the LoadFromFile function which doesn't properly validate user-supplied file paths. All users running 1Panel version 1.4.3 or earlier are affected.
💻 Affected Systems
- 1Panel
📦 What is this software?
1panel by Fit2cloud
⚠️ Risk & Real-World Impact
Worst Case
Attackers can read sensitive system files including SSH keys, database credentials, configuration files, and other secrets, potentially leading to full server compromise.
Likely Case
Attackers read configuration files containing credentials and secrets, enabling lateral movement and privilege escalation.
If Mitigated
With proper network segmentation and access controls, impact is limited to the 1Panel application's data and configuration.
🎯 Exploit Status
Exploitation requires authentication to the 1Panel interface. The vulnerability is simple to exploit once authenticated.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.5.0
Vendor Advisory: https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-pv7q-v9mv-9mh5
Restart Required: Yes
Instructions:
1. Backup your 1Panel configuration and data. 2. Stop the 1Panel service. 3. Update to version 1.5.0 using the official upgrade instructions. 4. Restart the 1Panel service.
🔧 Temporary Workarounds
Network Access Restriction
linuxRestrict network access to 1Panel interface to trusted IP addresses only
iptables -A INPUT -p tcp --dport 1PANEL_PORT -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 1PANEL_PORT -j DROP
Authentication Hardening
allImplement strong authentication policies and consider multi-factor authentication
🧯 If You Can't Patch
- Isolate the 1Panel server in a separate network segment with strict firewall rules
- Implement application-level WAF rules to block path traversal attempts
🔍 How to Verify
Check if Vulnerable:
Check 1Panel version via web interface or by examining the installation directory. Versions 1.4.3 and earlier are vulnerable.
Check Version:
Check web interface dashboard or run: cat /opt/1panel/version.txt
Verify Fix Applied:
Verify version is 1.5.0 or later and test that file path traversal attempts are blocked.
📡 Detection & Monitoring
Log Indicators:
- Unusual file access patterns in 1Panel logs
- Multiple failed file read attempts with path traversal patterns
Network Indicators:
- HTTP requests to /api/v1/file with path parameter containing ../ patterns
SIEM Query:
source="1panel" AND (path="*../*" OR parameter="*../*")