Slashdot Mirror


Dangerous Vulnerability Fixed In Wget

jones_supa writes: A critical flaw has been found and patched in the open source Wget file retrieval utility that is widely used on UNIX systems. The vulnerability is publicly identified as CVE-2014-4877. "It was found that wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP," developer Vasyl Kaigorodov writes in Red Hat Bugzilla. A malicious FTP server can stomp over your entire filesystem, tweets HD Moore, chief research officer at Rapid 7, who is the original reporter of the bug.

40 of 58 comments (clear)

  1. Wget by Anonymous Coward · · Score: 2, Funny

    Is that the tool you use to download IE ??

    Erm... wait, that wasn't right....

    1. Re:Wget by fugas · · Score: 1

      There's actually a tiny implementation of wget for Windows that I've been using for that type of thing precisely ;) It's called nugget, doesn't have all the bells and whistles of wget but still has some pretty interesting and unique features. Don't have the URL at hand, though.

    2. Re:Wget by tyggna · · Score: 1

      It's the tool you use to download elinks

  2. super user by goombah99 · · Score: 1, Insightful

    so dont run wget as root?

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:super user by gweihir · · Score: 1

      You should not do that anyways.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:super user by caseih · · Score: 4, Interesting

      Yes that's good practice for any command. Though wget is used behind the scenes by, say, opkg on openwrt boxes, which has to run as root since it's unpacking and installing packages. In fact on embedded devices, most everything runs as root there, typically, even if it's a bad idea, and is going to have to change as the internet of things becomes a fact of life. Never thought I'd need to run selinux on an embedded device, but we're to the point now where that's required.

      It's good to have this particular bug fixed at least.

    3. Re:super user by DarkOx · · Score: 2

      I was going to make essentially the same comment. Someone is going to jump in and suggest that utilities like that should have their own user account and call sudo or fork and su to start wget as the limited user, and fetch certificates to some specific directory.

      Those someones are probably correct, but we all know in practice that rarely happens.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    4. Re:super user by Anonymous Coward · · Score: 1

      Never thought I'd need to run selinux on an embedded device,

      Luckily at a point when the CPU and disk space of many embedded devices is now affordably at a point that makes the extra overhead viable.

    5. Re: super user by undisclosedrecipient · · Score: 4, Insightful

      Root access is the worst case indeed, but it's not a silver bullet if what you really want to protect is accessible by current user. I've seen my share of magical thinking banning root at all costs while in fact confidential data can be grabbed by an exploitable non-root user.

    6. Re:super user by Qzukk · · Score: 1

      which has to run as root since it's unpacking and installing

      wget isn't unpacking and installing, it should not be run as root.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    7. Re:super user by Anonymous Coward · · Score: 1

      If it's installing packages it can pwn your box anyway, no wget vulnerability required.

    8. Re:super user by MouseTheLuckyDog · · Score: 2

      Whoosh.

    9. Re:super user by MouseTheLuckyDog · · Score: 1

      Yes but, I would hope that an installation of openwrt is getting it's packages from a highly trusted source. If the source is using a bug to damage your system then you've got a lot more problems then wget.

    10. Re:super user by Anonymous Coward · · Score: 1

      Never thought I'd need to run selinux on an embedded device

      So, instead of using a program with a known vulnerability that's being fixed as we speak, you want me to run NSA code? FUCK OFF SHILL.

      SELinux is dead to me, regardless of whether it might or might not be safe to run. I refuse to trust anything that they've gone anywhere near. It's like how FTDI fucked up. You lost any trust I might have had, and I'm not auditing your piece of shit. I'm walking away from it.

    11. Re:super user by peppepz · · Score: 1
      It's not enough to download some files: in order to be susceptible to the attack, those devices should download stuff as root in recursive mode from a compromised ftp server. I honestly can't see that happening in reality.

      (But then again I wouldn't believe that home routers could be sold with an internet-facing backdoor open by default in their stock firmware, until that happened.)

    12. Re:super user by whoever57 · · Score: 1

      Though wget is used behind the scenes by, say, opkg on openwrt boxes, which has to run as root since it's unpacking and installing packages.

      No, it doesn't. A safer architecture would be to use an unprivileged user for downloading and only use root for installing.

      --
      The real "Libtards" are the Libertarians!
    13. Re:super user by rebelwarlock · · Score: 1

      I run everything as root because YOLO. I'm not gonna be guessing perms and retyping commands, son. I got shit to do.

  3. rapid7.com metasploit & kb.cert.org advisory by Anonymous Coward · · Score: 4, Informative

    - The disclosure is here:

    https://community.rapid7.com/c...

    - Vulnerability Note VU#685996 (kb.cert.org):

    http://www.kb.cert.org/vuls/id...

  4. Re:rapid7.com metasploit & kb.cert.org advisor by Anonymous Coward · · Score: 1

    - A Metasploit module is available for testing:

    https://github.com/rapid7/meta...

  5. Nothing to see here, move along by gweihir · · Score: 4, Informative

    Bug found, bug fixed, another venerable tool got even better. This is just business as usual.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Nothing to see here, move along by Anonymous Coward · · Score: 1

      not true - several distros have yet to publish anything or upgrade.

      this is important news not easily swept away by hand waving.

    2. Re:Nothing to see here, move along by gweihir · · Score: 4, Informative

      Very moderately so. Of course, you should not wget to not trustworthy servers until you have a patched version. But you should not do that anyways, even with the patched version. The biggest risk is still what you get from the server, even if it is confined to its intended place.

      Of course, for clueless people using insecure practice, this issue may have some importance. The others are not really at risk and will get the information anyways from the vulnerability information feed of their choice.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    3. Re:Nothing to see here, move along by jsepeta · · Score: 1

      wasn't this addressed in February?
      https://www.redhat.com/archive...

      --
      Remember kids, if you're not paying for the service, YOU ARE THE PRODUCT THAT IS BEING SOLD.
  6. Re:Dangerous Vulnerability Fixed In Wget by pe1rxq · · Score: 1

    The two terms are not mutualy exclusive

    --
    Secure messaging: http://quickmsg.vreeken.net/
  7. Re:Dangerous Vulnerability Fixed In Wget by Anonymous Coward · · Score: 1

    Yes, it is Free Software, but it is Open Source too.

    GNU Wget is licensed under GPL 3 or above, and GPL 3 is an OSI-approved Open Source licence.

  8. Neat. by ledow · · Score: 4, Insightful

    Neat trick.

    But if you have arbitrary FTP URL's from untrusted sources piped straight into wget on a server you run, you have bigger problems than someone trashing your filesystem or overwriting your /etc/passwd.

  9. Switching to windows by Anonymous Coward · · Score: 5, Funny

    Too tired of this kind of crap from the open source community

    1. Re:Switching to windows by Culture20 · · Score: 1

      Don't forget to manually update all the patches that should be part of a service pack before connecting to the network. Especially the ones that patch the Windows Update service that fix errors where Windows Update can be tricked into downloading and installing anything from anywhere.

    2. Re: Switching to windows by MrBingoBoingo · · Score: 1

      Well, OpenBSD patched this in 2009 in their wget...

  10. FTP? by Polizei · · Score: 1

    Anyone read the article?
    The vulnerability is only exploitable when fetching an FTP directory, recursively, from a malicious server.

    Yeah, it's a hole, but it's not shellshock. Stop bitching around and just update your box.

    1. Re:FTP? by ledow · · Score: 1

      And only as the user running wget.

      If someone can replace the URL's passed to wget as root, presumably it's only a small step to actually have them execute without needed wget to actually overwrite existing filesystem files.

    2. Re:FTP? by Anonymous Coward · · Score: 1

      Indeed. It cannot even be used with anonymous FTP to a site with full permissions on /incoming, it requires a symlink and a directory WITH THE SAME NAME, and no regular file system would allow that. So the FTP daemon needs to be specifically designed to send this.

      So yeah, unless ftp.redhat.com gets broken into, and the attacker gets root access to be able to replace ftpd, you don't need to worry about your package manager using wget to download stuff.

      And it only affects recursive downloads, so using wget to pull a URL from a malware e-mail is not going to be a problem either. Nobody would fetch those recursively.

  11. Re:2014 - Year of The *nix Exploits? by __aaclcg7560 · · Score: 1

    Everyone and their script kiddy grandmothers have claimed Windows as their own. If you want to earn your hacker creds these days, you need to go after *nix.

  12. Is busybox wget vulnerable? by emil · · Score: 1

    I can't tell from their website.

  13. Heartbleed, poodle, shellshock by Anonymous Coward · · Score: 1

    Where's the catchy buzzword to scare management?

  14. Not a problem if you have MAC by rgms · · Score: 1

    This is why I use AppArmor

  15. running strings on bad file also unsafe by throwaway18 · · Score: 2

    Slightly related;
    Lcamtuf writes that that running strings over a maliciously crafted file can probably result in code execution on your system.

    http://lcamtuf.blogspot.co.uk/2014/10/psa-dont-run-strings-on-untrusted-files.html

    The big picture is nothing new, when you use software, particularly software which is written in C/C++, to process data from untrustworth sources there is a reasonable chance of hard to spot security vulnerabilities.

    1. Re:running strings on bad file also unsafe by squiggleslash · · Score: 2

      Does anyone run "strings" on files they know enough to "trust"? It's essentially a "What the hell is this file? Let me see if it has any useful text strings in it that might give me a hint" tool.

      --
      You are not alone. This is not normal. None of this is normal.
  16. Debian updates by lord_rob+the+only+on · · Score: 1

    Well as I read this article, I just apt-get upgrade my system and voilÃ, vulnerability fixed. This is not to say "haha Debian p0wnz you" because any *serious* distro would be that reactive, I just find that's awesome to have patches available so quickly after a flaw is found.

  17. So, will this new bug be called... by v3xt0r · · Score: 1

    "The Hot-link Injection"?? Sounds pretty spicy.

    --
    the only permanence in existence, is the impermanence of existence.