Command Injection in tnftp fetch_url (NetBSD)
A command injection vulnerability exists in the fetch_url function in usr.bin/ftp/fetch.c in tnftp, as used in NetBSD versions 5.1 through 6.1.5. The vulnerability allows remote attackers to execute arbitrary commands by including a pipe (|) character at the end of an HTTP redirect, which is improperly handled by the fetch_url function.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows remote attackers to execute arbitrary commands on the affected system with the privileges of the user running tnftp, potentially leading to full system compromise.
If you can’t patch tonight, do this now.
Restrict usage of tnftp to trusted sources and users until a patch is applied. Monitor network traffic for suspicious HTTP redirects containing shell metacharacters. Consider disabling tnftp or using alternative tools that are not affected by this vulnerability.
Patch, then assume compromise.
Upgrade to a version of NetBSD or tnftp in which the fetch_url function has been patched to properly sanitize and handle HTTP redirects, specifically ensuring that special shell metacharacters such as the pipe (|) are not interpreted as part of a command.
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.