GHSA-j6g2-8fm3-rm8m: The FTP client trusts arbitrary IP addresses in the PASV server response
GHSA ID |
|
|---|---|
CVE ID |
CVE‑2026‑102722 |
Severity |
Medium |
CWE |
|
Published |
2026‑11‑01 |
Last updated |
2026‑11‑01 |
Affected packages
| Package | Vulnerable versions | Patched versions |
|---|---|---|
NetX Duo |
>= 6.0, ⇐ 6.5.2.202603a |
6.5.2.202603b |
Description
Summary
In IPv4 passive mode, the NetX Duo FTP client opens its data connection to whatever address the server names in its 227 reply, instead of to the server it is talking to. A malicious FTP server can therefore make the client connect to any host and port the device can reach, use the outcome as a scan of the internal network, and have the client deliver its uploads to an internal service.
Details
_nx_ftp_client_passive_transfer_setup() sends PASV and parses the server’s 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2) reply. Its validation covers only the shape of the reply and that the address and port are non-zero; it then sets the data socket’s connect address to the parsed address. A control connection to 192.0.2.10 and a reply naming 10,0,0,5,16,146 therefore produce a data connection to 10.0.0.5:4242.
The rest of the addon already enforces the rule this path lacks. The IPv6 branch of the same function, used for EPSV, takes the data connection’s address from the control connection, under a comment stating that the data connection uses the same network address as the control connection. The FTP server refuses a PORT command that names an address other than the client’s, which is the mirror image of this attack.
The client in IPv4 passive mode is the vulnerable path; passive mode is off by default and is enabled with nx_ftp_client_passive_mode_set(client, NX_TRUE), a common configuration for devices behind NAT. The same defect was fixed in curl (CVE-2020-8284) and CPython (CVE-2021-4189).
Impact
The attacker is the FTP server the device connects to, or one that controls the control connection. It gains two primitives against the network the device sits on, typically a plant or building network. Each data connection’s success or failure is reported back to the server over the control channel, which makes the device a port scanner for anything it can reach. On the upload path, the client connects to the named address and port and sends the file the application chose, so the server can have the device deliver its data to an internal service of the server’s choosing; the content is the application’s, not the attacker’s. Nothing on the device itself is read, altered or denied.
Affected configurations
Applications that use the NetX Duo FTP client with IPv4 and enable passive mode. EPSV over IPv6 is not affected.
Affected versions: [6.0, 6.5.2.202603a].
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N, CVSS-B 6.9 (Medium). CWE-918: Server-Side Request Forgery (SSRF).
The harm falls on systems the device can reach, not on the device, so only the subsequent-system metrics are set: SC:L for the scan exposing internal topology and SI:L for data delivered to an internal service. The requirement that the application enable passive mode is stated above rather than scored as an attack requirement.
Patches
Fixed in NetX Duo 6.5.2.202603b. The IPv4 passive path now connects the data socket to the control connection’s peer and takes only the port from the 227 reply, which is still parsed and validated, so a malformed reply is still refused. This is the reporters' patch, with one change: it copies the IPv4 address field directly instead of calling COPY_NXD_ADDRESS, which is not declared in builds without IPv6. New regression tests answer PASV with replies naming an address where nothing listens: the listing, download and upload complete with the fix and fail without it, and a malformed reply is still refused.
Credits
Found by Team Atlanta. Collected and verified by OSTIF using AI with their own harness. Manually verified, fixed and reported by Shielder. Integrated by Frédéric Desbiens.
The analysis of the additional primitives and the regression tests were produced with AI assistance under human review, in accordance with the Eclipse Foundation’s Generative AI Usage Guidelines.