I'm seriously shocked. This is ridiculous. This looks like possibly the easiest root exploit ever discovered on a desktop OS (a one-liner in bash). Why in the world would they allow an env variable to write to a file in a setuid'd binary? I'm suddenly very glad I don't use my macbook as my main machine, but I guess I'll remove the set{u,g}id bits on newgrp for now. Don't know if that will break things, but it's bette…
Ignoring the nonexistent "root" privileges on Windows-95 (which allowed anything to change anything it felt like), also one of the easiest to fix:
mv /usr/bin/sudo /usr/bin/some-other-name-that-you-like-and-there-ya-go