Net::FTP before 3.17 follows the PASV reply address (CVE-2026-40558)
The Perl FTP client opens its passive data channel to whatever host the server names in PASV.
FTP PASV address trust in Perl Net::FTP before 3.17
Perl Net::FTP before 3.17 opens the passive data channel to the IP address in a server’s 227 PASV reply and never checks it against the control-connection peer. A malicious FTP server can make a connecting client open TCP connections to arbitrary hosts and ports, including internal addresses reachable only from that client. Anyone using Net::FTP against an untrusted server is affected.
What to do: Upgrade Net::FTP to 3.17. Do not use affected clients against untrusted FTP servers until then.
| Product | Affected | Fixed in |
|---|---|---|
| Perl Net::FTP | before 3.17 | 3.17 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Net::FTP versions before 3.17 for Perl connect the passive data channel to the address named in the server's PASV reply. The pasv method uses the IP address from the server's 227 reply for the data connection and never compares it with the control connection's peer. A malicious FTP server can make the client open TCP connections to arbitrary hosts and ports, including internal addresses reachable only from the client.
The Perl FTP client opens its passive data channel to whatever host the server names in PASV.
Today 2.5K readers · 5K views · 287 reads · all time 290K views