GHSA-r2qx-83vg-xqx4: FTP Passive Data Connection Not Bound to the Authenticated Control Peer

GHSA ID

GHSA‑r2qx‑83vg‑xqx4

CVE ID

CVE‑2026‑102727

Severity

Medium

CWE

CWE-923

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

The NetX Duo FTP server accepts the first TCP connection to a passive data port without checking that it comes from the client that requested passive mode. An unauthenticated network peer that connects to the advertised port first receives the file an authenticated user downloads, or supplies the contents of the file the user uploads. Passive data ports are allocated sequentially, so the next one is easy to predict.

Details

On PASV and EPSV, the server picks a data port from nx_ftp_server_data_port, which increments for each passive request, starts listening on it, and accepts the first incoming connection. Neither path compares the accepted peer’s address with nx_tcp_socket_connect_ip of the authenticated control connection, although the server already uses that address for its login and logout callbacks.

The transfer that follows uses whichever socket was accepted. For RETR, LIST and NLST, the server sends the file or listing over it. For STOR, _nx_ftp_server_data_process() writes the data received on it into the file the user opened.

Impact

An attacker who reaches the passive port before the legitimate client receives the content of a download the user requested, or writes attacker-supplied content into the file the user is uploading. The attacker never authenticates and does not choose the file or the operation: it obtains or alters only what the user transfers. The attacker must know or predict the passive port and win the race to connect before the legitimate client; the sequential port numbering makes the first easy.

Affected configurations

Applications that run the NetX Duo FTP server, for transfers the client makes in passive mode, over IPv4 (PASV) or IPv6 (EPSV).

Affected versions: [6.0, 6.5.2.202603a].

Severity

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N, CVSS-B 6.0 (Medium). CWE-923: Improper Restriction of Communication Channel to Intended Endpoints.

AT:P for the race against the legitimate client’s connection. AC:L because the passive port is predictable rather than protected. UI:P because an authenticated user must start the transfer. VC:H because the files an FTP server protects with authentication can be sensitive in their entirety; VI:L because, on upload, the attacker controls the content but not the file it lands in.

Patches

Fixed in NetX Duo 6.5.2.202603b. The server now compares the address of each passive data connection, IPv4 or IPv6, with the control connection’s peer. It resets a mismatched connection and listens again on the same port, waiting for the client only for what remains of NX_FTP_SERVER_TIMEOUT; on STOR, a refused connection writes nothing and does not end the upload. Data connections from any other host, including server-to-server (FXP) transfers, are now refused. New regression tests in which a third host connects first, over IPv4 and over IPv6, fail without the fix.

Credits

Found by SecMate automated analysis (https://secmate.dev/). Reported by VulnCheck. Fixed by Frédéric Desbiens.

The fix and regression test were produced with AI assistance under human review, in accordance with the Eclipse Foundation’s Generative AI Usage Guidelines.