Impact
The ftpcp() routine in Python’s ftplib module accepts the host address provided in a server‑generated PASV response and uses it to open the data connection. Because the function does not verify that the address matches the control‑channel peer, an attacker who controls the FTP server can supply any IP and port in the PASV reply, leading the client to establish a TCP connection to that address. This behavior can expose internal services or allow the client to reach otherwise inaccessible networks, and it is classified as CWE‑918. It is inferred that the attacker must control the FTP server to supply a malicious PASV response.
Affected Systems
Any CPython installation that ships the unpatched ftplib module is potentially vulnerable. The advisory references the CPython project and its community pull request that introduced the fix, but no specific released version numbers are listed because the patch had yet to be merged into a released distribution at the time of the advisory.
Risk and Exploitability
The CVSS score of 5.9 denotes moderate severity. Exploitation requires a client to connect to an attacker‑controlled FTP server that sends a crafted PASV reply; no client‑side privileges or special network conditions are necessary. The EPSS score is unavailable, and the vulnerability is not listed in the CISA KEV catalog, suggesting limited widespread exploitation. The likely attack vector involves an attacker hosting a malicious FTP server, connecting to the vulnerable Python client, and issuing a PASV response with a chosen IP and port so that the client initiates a connection to the attacker‑controlled destination.
OpenCVE Enrichment