That was fast. Despite the fact that the Galaxy S5 won't be released for another two weeks, well-known developer and modder Chainfire has already rooted the phone. Well, at least one of the Galaxy S5s (S Fives? Galaxies S5? whatever), specifically the SM-G900F model, which seems to be the international GSM-LTE version. The root method will probably work with at least some regional and carrier variants.
To get root privileges, check out this XDA-Developers post for Chainfire's latest version of the CF-Auto-Root tool, flashable via a PC with Samsung's ODIN tool.