Skip to main content
Mallory
UnratedVulnerability

CVE-2026-40558: Passive-mode data connection redirection in Perl Net::FTP

Updated 1 day ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days6 mentions · peak 2 in a dayToday
CVSS-Not scored
EPSS-30-day exploit probability
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
IdentifiersCVE-2026-40558CWE-918

CVE-2026-40558 is a connection-redirection vulnerability in Net::FTP within Perl's libnet distribution. The Net::FTP::pasv() function trusts the IP address supplied in an FTP server's 227 passive-mode reply, allowing a malicious server to redirect the client's data connection to an arbitrary third-party host instead of the control-connection peer. This enables server-side request forgery through applications using the affected FTP client. Libnet 3.17 corrects the behavior by ignoring the advertised IP address and connecting the data channel to the control-connection peer.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

A malicious FTP server can cause an affected client to initiate data-channel connections to third-party hosts reachable from the client's network, potentially crossing network trust boundaries. Depending on the FTP operation and destination service, this can expose uploaded data to an unintended recipient or cause the client to receive attacker-directed data. The established primitive is data-connection redirection; arbitrary code execution is not established.

Mitigation

If you can’t patch tonight, do this now.

Until patched, prevent affected applications from connecting to untrusted FTP servers and restrict their outbound connectivity to approved destinations. Where feasible, enforce that passive FTP data connections use the same remote IP address as the control connection, blocking server-directed connections to unrelated hosts.

Remediation

Patch, then assume compromise.

Upgrade Perl's libnet distribution to version 3.17 or a vendor package containing the equivalent fix. The correction makes Net::FTP::pasv() ignore the IP address in the server's 227 reply and use the control-connection peer for the data channel. For Echo, update Perl and related packages to version 5.40.1-6+e21 or later. Fedora 45 users should apply the perl-libnet update associated with advisory FEDORA-2026-ada4328480. A fixed Debian package version is not identified in the available information.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
FAQ

Frequently asked questions

Is CVE-2026-40558 exploited in the wild?
As of Nov 27, 2026, Mallory has no reports of CVE-2026-40558 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-40558?
As of Nov 27, 2026, Mallory has found no public exploit for CVE-2026-40558.
Is there a patch for CVE-2026-40558?
Upgrade Perl's libnet distribution to version 3.17 or a vendor package containing the equivalent fix. The correction makes Net::FTP::pasv() ignore the IP address in the server's 227 reply and use the control-connection peer for the data channel.
Activity feed

Recent activity

6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+2 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.