AZL-116665: CVE-2026-40558 affecting package libnet 1.2-2
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.17
Event History
Frequently Asked Questions
Which deployments are exposed?
Applications using Net::FTP versions earlier than 3.17 are exposed when they connect to an FTP server that can provide a malicious PASV response.
What does an attacker need to exploit this issue?
The attacker needs to control, or otherwise cause the client to connect to, an FTP server that returns a crafted 227 PASV reply. The client will use the address in that reply for the passive data connection without verifying that it matches the control connection peer.
What can a successful exploit reach?
A malicious server can cause the client to initiate TCP connections to arbitrary hosts and ports, including internal addresses that are reachable from the client but not from the attacker.