Perl Net::FTP PASV handling lets a server choose the client's next connection
Passive FTP can sound like a server-side convenience: the client asks the server for a data port and connects to it. CVE-2026-40558 shows why the client must still constrain that connection. In Perl's Net::FTP before libnet 3.17, the pasv method uses the IP address in the server's 227 reply for the data connection and does not compare it with the control connection's peer. A malicious FTP server can therefore make the client open TCP connections to arbitrary hosts and ports, including addresses reachable only from the client.
The CNA classifies the issue as CWE-918, server-side request forgery, in the context of a client library. The label is useful even though the vulnerable code is a client. The trust decision is being made on the wrong side of the network boundary. The FTP server controls the destination, while the client's network position controls what can be reached.…