Skip to main content

Security Exposure

FTP data connections carry file contents unencrypted, so anyone on the network path can read or alter transferred files. RFC 2577 describes the FTP bounce attack, where a client uses the PORT command to make the server open data connections to third-party hosts and services. Port 20 only exists alongside an FTP control service on port 21, so its exposure follows the risks of that service.

Hardening

  • Replace FTP with SFTP or FTPS, as UK Government Cyber Unit guidance recommends.
  • Configure the server to refuse PORT commands that point to ports below 1024, as RFC 2577 suggests against bounce attacks.
  • Consider disabling the PORT command and allowing passive mode only, which RFC 2577 lists as a bounce attack defense.
  • Remove inbound firewall and port forwarding rules for FTP ports when the service is not needed.

Monitoring

Log FTP data connections together with the control session on port 21. Outbound data connections to hosts other than the client that opened the control session can indicate PORT command abuse.

FTP data Vulnerabilities

4 CVEs
CVECVSS
CVE-2015-3306KEV
ProFTPD Improper Access Control Vulnerability
10.0
CVE-2025-47813KEV
Wing FTP Server Information Disclosure Vulnerability
4.3
CVE-2025-47812KEV
Wing FTP Server Improper Neutralization of Null Byte or NUL Character Vulnerability
10.0
CVE-2021-35211KEV
Serv-U Remote Memory Escape Vulnerability
9.0

Frequently Asked Questions

Is port 20 TCP or UDP?→

FTP runs over TCP, so port 20 data connections are TCP connections. IANA also lists UDP and SCTP entries for ftp-data, but they are not used by standard FTP.

What is the difference between port 20 and port 21?→

Port 21 carries the FTP control connection for commands and replies. Port 20 is the server's data port in active mode; in passive mode the server uses a dynamic high port for data.

Does FTP always use port 20?→

No. Port 20 is used only in active mode. In passive mode, requested with the PASV command, the client opens the data connection to a port the server chooses.

Which vulnerabilities affect the service on port 20?→

This database lists 4 CVEs related to FTP data, 4 of them confirmed as exploited by CISA. Examples: CVE-2015-3306, CVE-2025-47813, CVE-2025-47812, CVE-2021-35211.

Port assignments from the IANA Service Name and Transport Protocol Port Number Registry. Services can be configured to run on any port, so traffic on port 20 is not guaranteed to be FTP data. Exploited-in-the-wild data from the CISA KEV catalog (CC0).