A little while ago Geohot released a very simple way to root a Samsung Galaxy S5 (which can be applied to other Android devices as well).
Is it safe or too good to be true ?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
It is legitimate. (Or as legitimate as an exploit can be. It isn't malware and if used properly has little chance of doing damage itself.)
Obviously the usual cautions apply with rooting any device. You may void your warranty. Be sure to read through the forums at xda or other guides to be sure how and what can be recovered if something goes wrong because of a change made with root access. You probably don't want to root your brand new phone and then not have any understanding or way to recover if something goes wrong down the road. Just do your research first. It will be worth the time spent.