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

Published Nov 29, 2026 CVSS n/a EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Net::FTP module for Perl prematurely trusts the IP address supplied in a server’s 227 PASV reply. The client opens a data channel to that address without reconciling it against the control connection’s peer. This allows a malicious FTP server to coerce a client into establishing TCP connections to arbitrary hosts and ports, including internal addresses reachable only from the client. A compromised client could therefore expose internal services or exfiltrate data without further authorization.

Affected Systems

Perl installations that include libnet Net::FTP versions older than 3.17 are affected. Systems running Perl applications or scripts that invoke Net::FTP in passive mode are at risk, regardless of the operating system or platform.

Risk and Exploitability

While no CVSS or EPSS score is publicly available, the flaw offers significant risk by enabling attackers to redirect client outbound traffic. The vulnerability is easy to exploit from an unauthenticated FTP server and can lead to internal network discovery or data leakage. The lack of an EPSS score does not diminish the recommendation to remediate promptly, and the issue is not currently catalogued as a known exploited vulnerability.

Remediation

Vendor Solution

Upgrade to libnet 3.17 or later.


Vendor Workaround

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


OpenCVE Recommended Actions

  • Upgrade libnet to 3.17 or later to fix the address validation bug
  • If an upgrade is not feasible on the current Perl installation, install the newer libnet package into the @INC path so that it shadows the vulnerable core module
  • Restrict outbound connections originating from applications using Net::FTP to mitigate potential lateral movement from compromised clients

Generated by OpenCVE AI on November 29, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title Net::FTP versions before 3.17 for Perl connect the passive data channel to the address named in the server's PASV reply
Weaknesses CWE-918
References

Subscriptions

No data.

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 30, 2026, 12:14 AM
Reserved
Apr 14, 2026, 11:31 AM
Status
Received
Published
Nov 29, 2026, 11:17 PM
Modified
Nov 30, 2026, 1:17 AM