Menu

Perl Net::FTP PASV handling lets a server choose the client's next connection
📰

Perl Net::FTP PASV handling lets a server choose the client's next connection

DEV Community: perl·yutianle·6 days ago
#CC80LMqm
#devtoperl#devto#dev#server#client
Long article (547 words) — no AI summary yet.
Reading 0:00
15s threshold

Perl Net::FTP PASV handling lets a server choose the client's next connection

Passive FTP can sound like a server-side convenience: the client asks the server for a data port and connects to it. CVE-2026-40558 shows why the client must still constrain that connection. In Perl's Net::FTP before libnet 3.17, the pasv method uses the IP address in the server's 227 reply for the data connection and does not compare it with the control connection's peer. A malicious FTP server can therefore make the client open TCP connections to arbitrary hosts and ports, including addresses reachable only from the client.

The CNA classifies the issue as CWE-918, server-side request forgery, in the context of a client library. The label is useful even though the vulnerable code is a client. The trust decision is being made on the wrong side of the network boundary. The FTP server controls the destination, while the client's network position controls what can be reached.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.