Libnet server-side request forgery in Net::FTP passive mode
- Exploited
- No known exploitation
- Fix
- Fixed in 3.17
- Who is exposed
- Not reported
Summary
Net::FTP for Perl (affected packages: libnet and perl) connects the passive data channel to whatever address the server names in its PASV reply, without checking that address against the server the client is talking to. A malicious FTP server can use this to make the client open TCP connections to arbitrary hosts and ports, including internal addresses that only the client can reach.
Written by a model
Original 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.
What to do
Upgrade to a fixed version: 3.17.
Workaround: Install libnet 3.17 or later into your @INC include path, so it takes precedence over the vulnerable core module shipped with Perl.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by 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), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-40558 (entry last updated 2026-11-29):
Affected:
- libnet: fixed in 3.17
- perl: from 5.7.3, through 5.45.5
Fixed versions: 3.17.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Workaround: Install libnet 3.17 or later into your @INC include path, so it takes precedence over the vulnerable core module shipped with Perl. (source: https://www.cve.org/CVERecord?id=CVE-2026-40558)
CISA KEV: CVE-2026-40558 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-40558 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/steve-m-hay/perl-libnet/commit/4e5ce1cfa901a9bc2aad2b635b5434154983ff12.patch
- https://metacpan.org/release/SHAY/libnet-3.17/changes
- https://www.cve.org/CVERecord?id=CVE-2026-40558
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-40558
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-40558"}.Affected versions
- libnetfixed in 3.17
- perlFrom 5.7.3 · through 5.45.5
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure?/25Unknown. Advisories don't say whether default setups are affected
- Reach?/20Unknown. No tracked technology or package matched
- Severity?/10Unknown. No CVSS score or vendor rating
- No patch0/5No signal
What would change the score
- Would score about 55 if added to CISA KEV
- Would score about 50 if CISA's SSVC rates exploitation active
- Would score about 22 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 4
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-40558 |
| Record | NVD · CVE-2026-40558 |
| Other links 2 | |
| Patch | GitHub · steve-m-hay/perl-libnet · Commit 4e5ce1cf |
| Link | metacpan.org · release/SHAY/libnet-3.17/changes |
Questions about CVE-2026-40558
Is CVE-2026-40558 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-40558?
libnet: before 3.17. perl: from 5.7.3 through 5.45.5.
Source: cve.now feed data
How do I fix CVE-2026-40558?
Upgrade to a fixed version: 3.17. The vendor's advisory also recommends libnet 3.17 or later.
Source: cve.now feed data, cve.org
Related
- CVE-2026-137954Pydantic Deep 0.2.18 before 0.4.0 SSRF and File Read via /export/pdf
- CVE-2026-80475Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Server-Side Request Forgery (SSRF) vulnerability.
- CVE-2026-80448Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Server-Side Request Forgery (SSRF) vulnerability.
- CVE-2026-138033mcp-video-analyzer 0.2.0 before 0.10.1 SSRF via Direct Video URLs
- CVE-2026-137969ToolJet before 3.21.96-LTS SSRF Protection Bypass via DNS Rebinding
- CVE-2026-138331GopeedLab Gopeed Web Proxy Endpoint api.go DoProxy server-side request forgery
No corrections so far. Something wrong on this page? Report an error.