New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security issue with nvm path #2140
Comments
|
I think your concern is quite overblown, for one - nowadays you're not supposed to install any global packages anyways, which addresses the risk. Additionally, one of the biggest benefits of using nvm is not having to use The ability for nvm to shadow |
|
Thanks @ljharb. I understand that nvm folder should precede any other |
|
I believe that this is also the same choice nearly every PATH-modifying tool makes (other package/version managers, primarily) |
|
Yes, the first time time I learned about this issue was reading about Hombrew here. That's why I started using MacPorts instead. However I can't afford not using nvm because it eases a lot my developer experience. In my case I just changed bin folder privileges to |
Hi nvm collaborators!
I recently installed nvm in my MacBook and noticed something that brought my attention. When I inspect my $PATH variable I saw that the nvm bin folder is prepended to the current list like this:
I'm not a security expert but as far as I know this setup is opening the door for Sudo Piggyback attacks in which a malicious script can insert a malicious sudo program in the nvm bin folder without any problem and thus replace the original sudo program located in
usr/binin order to steal password information and other things.I was wondering if this can be addressed by not prepending but appending the path to the end of the list like this (as Flutter does for example):
Or at least changing the owner and group privileges of the bin folder to
rootandwheelto ask for admin credentials anytime someone tries to write in the folder:Let me know your thoughts about this matter.
Best regards.
The text was updated successfully, but these errors were encountered: