Vulnerabilities found in more command-line tools, wget and tnftp get patches

Flaws identified in wget and tnftp allow malicious servers to execute rogue commands on users' systems

The critical Shellshock vulnerabilities found last month in the Bash Unix shell have motivated security researchers to search for similar flaws in old, but widely used, command-line utilities.

Two remote command execution vulnerabilities were patched this week in the popular wget download agent and tnftp client for Unix-like systems. This comes after a remote code execution vulnerability was found last week in a library used by strings, objdump, readelf and other command-line tools.

GNU Wget is the go-to utility for downloading Web-based files and resources on a Linux system using the command-line interface. In addition to being used manually, wget is commonly called by custom scripts and scheduled tasks -- cron jobs on Linux.

"Wget versions prior to 1.16 are vulnerable to a symlink attack (CVE-2014-4877) when running in recursive mode with a FTP target," said HD Moore, the chief research officer at Rapid7 who found the vulnerability, in a blog post Tuesday.

"This vulnerability allows an attacker operating a malicious FTP server to create arbitrary files, directories, and symlinks on the user's filesystem," Moore explained. "The symlink attack allows file contents to be overwritten, including binary files, and access to the entire filesystem with the permissions of the user running wget."

Ultimately, the vulnerability can lead to remote code execution.

Users should either upgrade to wget 1.16 or make sure their Linux distribution ships a wget package that has the CVE-2014-4877 patch applied. The flaw can also be mitigated by manually adding the line "retr-symlinks=on" in the /etc/wgetrc or ~/.wgetrc settings files, Moore said.

Tnftp is a cross-platform port of the original BSD FTP client. It is the default FTP client in NetBSD, FreeBSD, DragonFly BSD and Mac OS X, but it is also available in many Linux distributions.

A vulnerability patched this week in tnftp allows a malicious server to execute arbitrary commands on the user's system. The issue is being tracked as CVE-2014-8517.

"If you do 'ftp http://server/path/file.txt'; and don't specify an output filename with -o, the ftp program can be tricked into executing arbitrary commands," said NetBSD's security officer Alistair Crooks in a message to the Open Source Security mailing list Tuesday. Crooks' email also included a patch created by the NetBSD developers.

The tnftp package shipped with OpenBSD is not vulnerable due to some changes made to the code some time ago, according to a reply by OpenBSD developer Stuart Henderson.

Debian, Red Hat, Gentoo and Novell have posted security advisories about the tnftp issue.

Crooks said that he also informed Apple about the flaw, which is present in OS X 10.10 (Yosemite), but only received "a boilerplate reply" from the company.

The flaws found this year in OpenSSL, Bash, strings and now wget and tnftp indicate a trend of new bugs being found in old code, said Rob VandenBrink, an incident handler at the SANS Internet Storm Centert, in a blog post Thursday. "Coders who wrote stuff in C back in the day didn't always write code that knew how much was too much of a good thing. Now that we're all looking at problems with bounds checking on input data, expect to see at least a couple more of these!"

The danger is that these flaws are found in utilities that a lot of people use every day. As VandenBrink puts it they "are part of our standard, trusted toolkit."

Join the CSO newsletter!

Error: Please check your email address.

Tags patchesonline safetySANS InstitutesecurityRapid7Exploits / vulnerabilities

More about AppleDebianLinuxNovellOpenBSDRapid7Red Hat

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts