Python ftplib PASV Response Vulnerability in ftpcp() Function Allows Server-Side Request Forgery

Vulnerability

A vulnerability in the ftplib module of Python's standard library allows for server-side request forgery (SSRF) by trusting server-supplied PASV host addresses. The issue arises in the ftpcp() function, which still uses raw, attacker-controllable IP addresses and ports from the PASV response, instead of the actual peer address. This flaw could be exploited by a malicious FTP server to redirect connections to arbitrary IP addresses and ports, potentially leading to port scanning and banner grabbing from private networks.

Impact

Exploitation of this vulnerability could allow a malicious FTP server to redirect connections to internal IP addresses and ports, potentially leading to unauthorized access or information disclosure from private network services.

Remediation

Users can upgrade to Python versions 3.10.13, 3.11.6, 3.12.1, 3.13.0, 3.14.0, or 3.15.0, where this vulnerability has been fixed.

Added: May 13, 2026, 9:21 PM
Updated: May 13, 2026, 9:21 PM

Vulnerability Rating

Custom Algorithm
spread
7.8
impact
0.6
exploitability
4.8
remediation
7.7
relevance
8.2
threat
3.2
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.