Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The vulnerability was that 'go get github.com/malicious/go-repo' would execute arbitrary code if that repo had a specifically named executable file in it.

A user's interactive terminal having certain conveniences is different, and the command not found handler is only used in an interactive context.

Yes, if a user types "pwnme" in their terminal in a directory that has a malicious executable from the internet named "pwnme", they're owned. Same as if they type "./pwnme" without the command not found handler.

It doesn't really change anything; you have to be aware of what you're typing and what it'll do at an interactive terminal.

The go one is a vulnerability because 'go get' is supposed to have a contract that it can't execute arbitrary code, while an interactive terminal that a user types text into doesn't necessarily have that contract.

Also, it will try the path _first_ before command-not-found, so most forms of this vulnerability (a file named 'ls' or whatever) won't cause a vulnerability with this helper variant.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: