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
Check your servers for CVE-2026-40558
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-40558 affects libnet, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 0.31%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 16.1% of all scored CVEs. Scores of 30 Nov 2026.
Weakness
- CWE-918 Server-Side Request Forgery
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
libnet
package
libnet |
affected before 3.17
Other versions: unaffected
|
|
perl
package
perl |
affected from 5.7.3 up to and including 5.45.5
Other versions: unaffected
|
Is my server affected?
Find the installed version of libnet and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i libnet
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-40558 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-40558RHEL, Rocky, Alma, Fedora
rpm -q libnet
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-40558Alpine
apk list --installed | grep -i libnetWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-40558
trivy image --scanners vuln IMAGE | grep CVE-2026-40558
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Patches and release notes
- https://github.com/steve-m-hay/perl-libnet/commit/4e5ce1cfa901a9bc2aad2b635b5434154983ff12.patch github.com · patch
- https://metacpan.org/release/SHAY/libnet-3.17/changes metacpan.org · release notes
Other references
Source: the record CVE-2026-40558 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse