How long do germs live on inanimate objects?
up to six hours.
To a degree, everything spreads germs. Your grandma spreads germs. As long as a the hamster is kept in clean conditions and is healthy, it shouldn't spread anything really harmful. Keep in mind, they do live in the same cage where they urinate and defecate, so after you handle them, you really do need to wash your hands before you make your next sandwich.