The security issue has not really anything to do with where you install something, but that when you run something it has access to everything you have.
Linux needs fine grained easy to use permissions, on desktop _and_ servers, there is a reason there is a high investment in container technologies and there is selinux and apparmor.