CVE-2021-40491
Medium · 6.5CVSS
6.5
EPSS
1.0%
Published
Sep 3, 2021
CISA due date
—
Cloudanix analysis
An FTP program used on some Linux systems could be tricked into sending files to the wrong computer, which might let someone else see or take the data.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The FTP client fails to validate that the IP address returned in PASV/LPSV responses matches the original server address, allowing a malicious or compromised server (or MITM) to redirect subsequent data connections to an arbitrary endpoint controlled by the attacker.
Why it matters to the business
Systems relying on the affected FTP client for file transfers risk unintended data exposure or leakage to attacker-controlled hosts, increasing exposure in legacy automation, embedded devices, or environments where FTP remains in use.
How an attack unfolds
An attacker either hosts a malicious FTP server or intercepts legitimate FTP traffic; when the client issues a data transfer command, the server replies with a PASV response containing an attacker-chosen address; the client then opens a data connection to that address, allowing the attacker to receive or inject file contents.
How to fix it
Upgrade inetutils to the fixed versions listed for each distribution: Debian 11 to 2:2.0-1+deb11u1 or later, Debian 12/13 to 2:2.2-1 or later, and the upstream git commit 58cb043b190fd04effdaea7c9403416b436e50dd. Replace any custom builds or embedded copies with patched releases.
How to confirm the fix worked
Verify installed package versions against the fixed releases above; test that PASV responses containing mismatched addresses are rejected by the client; review build logs or package manifests for the vulnerable pre-2.2 inetutils ftp binary.
Typical attack path
- Attacker places a malicious FTP server or performs traffic interception
- Victim client initiates an FTP session and requests a data transfer
- Server returns a crafted PASV/LPSV response pointing to attacker IP/port
- Client opens data connection to the supplied address
- File contents are transferred to or from the attacker-controlled endpoint
How to detect it
Search system and application logs for ftp client invocations that resulted in data connections to unexpected external IPs; review network flow records for FTP data-channel sessions whose destination IP differs from the control-channel server IP; examine package history for pre-2.2 inetutils installations.
What your security team should do
- Prioritize upgrade of inetutils packages on all Debian-based systems still running pre-2.2 releases
- Audit scripts, containers, and appliances that invoke the inetutils ftp client and replace with a validated client (e.g., curl, wget, or modern ftp utilities)
- Add package version checks to vulnerability scanning and configuration management pipelines
- Monitor for any remaining legacy FTP usage and migrate to SFTP or FTPS where feasible
The record
The ftp client in GNU Inetutils before 2.2 does not validate addresses returned by PASV/LSPV responses to make sure they match the server address. This is similar to CVE-2020-8284 for curl.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | inetutils | 0 | 2:1.9.4-7+deb10u2 |
| Debian:11 | inetutils | 0 | 2:2.0-1+deb11u1 |
| Debian:12 | inetutils | 0 | 2:2.2-1 |
| Debian:13 | inetutils | 0 | 2:2.2-1 |
| Ubuntu:20.04:LTS | inetutils | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | inetutils | 0 | 2:1.9.2-1ubuntu0.1~esm1 |
| Ubuntu:Pro:16.04:LTS | inetutils | 0 | 2:1.9.4-1ubuntu0.1~esm2 |
| Ubuntu:Pro:18.04:LTS | inetutils | 0 | 2:1.9.4-3ubuntu0.1+esm1 |
| Ubuntu:Pro:20.04:LTS | inetutils | 0 | 2:1.9.4-11ubuntu0.2+esm1 |
| Ubuntu:Pro:20.04:LTS | inetutils | 0 | 2:1.9.4-11ubuntu0.1+esm1 |
Related vulnerabilities
- CVE-2011-4862 Buffer overflow in libtelnet/encrypt.c in telnetd in FreeBSD 7.3 through 9.0, MIT… Also affects inetutils
- CVE-2020-10188 utility.c in telnetd in netkit telnet through 0.17 allows remote attackers to execute… Also affects inetutils
- CVE-2014-3634 rsyslog before 7.6.6 and 8.x before 8.4.1 and sysklogd 1.5 and earlier allows remote… Also affects inetutils
- CVE-2026-102682 Pipecat is an open-source Python framework for building real-time voice and multimodal… CWE-345
- CVE-2026-104850 MCP TypeScript SDK is the official TypeScript SDK for Model Context Protocol servers and… CWE-345
- CVE-2026-102275 PyJWT is a Python implementation of JSON Web Token standards. CWE-345
- CVE-2026-102267 PyJWT is a Python implementation of JSON Web Token standards. CWE-345
- CVE-2026-19941 An inapplicable NSEC record may be accepted by a `named` resolver as proof that no… CWE-345