CVE-2026-40558: Net::FTP versions before 3.17 for Perl connect the passive data channel to the address named in the server's PASV reply Robert Rothenberg 29 Nov 2026 22:43 UTC

========================================================================
CVE-2026-40558                                       CPAN Security Group
========================================================================

         CVE ID:  CVE-2026-40558

   Distribution:  libnet
       Versions:  before 3.17
       MetaCPAN:  https://metacpan.org/dist/libnet
       VCS Repo:  https://github.com/steve-m-hay/perl-libnet

   Distribution:  perl
       Versions:  from 5.7.3 through 5.45.5
       MetaCPAN:  https://metacpan.org/dist/perl
       VCS Repo:  https://github.com/Perl/perl5

Net::FTP versions before 3.17 for Perl connect the passive data channel
to the address named in the server's PASV reply

Description
-----------
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.

Problem types
-------------
- CWE-918 Server-Side Request Forgery

Workarounds
-----------
Install libnet 3.17 or later into your @INC include path, so it takes
precedence over the vulnerable core module shipped with Perl.

Solutions
---------
Upgrade to libnet 3.17 or later.

References
----------
https://github.com/steve-m-hay/perl-libnet/commit/4e5ce1cfa901a9bc2aad2b635b5434154983ff12.patch
https://metacpan.org/release/SHAY/libnet-3.17/changes