According to studies, the bacteria that cause cavities can be transmitted from one person to another. Sugar, candies, and sweets are usually blamed for rotten teeth, but the real culprits are bacteria, called Streptococcus mutans, which are contagious.
http://www.dentistcudahyca.com/are-cavities-contagious/