Forgive me if I'm misunderstanding the vulnerability, but isn't this one of Raymond Chen's "It rather involved being on the other side of this airtight hatchway" exploits? That is, any commands you run has the same permissions as you have. Now, I understand that you may not intimately understand 100% the code of the commands and shell extensions you use, but is that a "vulnerability"?
A proof-of-concept of a vulnerability in custom shell prompt scripts
11–20 of 54 posts
Cloning a repository and cd'ing into it should always be safe, no matter what that repository is. This vulnerability makes it not safe.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#12Forgive me if I'm misunderstanding the vulnerability, but isn't this one of Raymond Chen's "It rather involved being on the other side of this airtight hatchway" exploits? That is, any commands you run has the same permissions as you have. Now, I understand that you may not intimately understand 100% the code of the commands and shell extensions you use, but is that a "vulnerability"?
If allows an attacker to execute arbitrary code in a situation where you wouldn't expect that (such as merely CDing to an attacker-controlled directory), then yeah of course it's a vulnerability.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#13Nice find. Luckily I am hyper-paranoid about escaping, so even though my custom jankery is probably not as performant as it could be, it's not vulnerable to this or similar exploits.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#14The "official" git prompt[1] is safe on Bash; the script doesn't run. [1]: https://github.com/git/git/blob/master/contrib/completion/gi...
In particular see the long comment at line 324.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#15ohmyzsh is vulnerable.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#16My OSX shell prompt is vunerable, I'm using zsh, oh-my-zsh, and powerlevel9k/powerlevel9k as my theme.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#17git for windows seems to be fine.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#18Cute idea. I'm willing to bet that the Bash script I wrote for some of my co-workers is vulnerable. I guess that's something I should find out ... by making their computers do stuff.
However, I currently use Fish shell myself and it seems to be safe: http://imgur.com/a/rjocA
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#19On fish and omf here, not vulnerable. I suppose I should test fisherman on my other machine as well.
I've confirmed fisherman is safe on my machine.
Re: A proof-of-concept of a vulnerability in custom shell prompt scripts
#20Liquid Prompt [0] seems safe.