Rare, but possible
Any household pet can potentially pass along a disease to humans (zoonoses).
However, hamsters are usually relatively benign in this regard; the biggest concern from hamsters regards bites and allergies
to their dander. Guinea pigs are known to be carriers of the causative agent of salmonella
sometimes. It is always a good idea to wash one's hands after handling a pet (including dogs
Answer assisted by David Escobar, Medical Student