Salt consists of anti-bacterial and anti-septic properties. It helps in killing the bacteria that causes the cavity. Brushing your teeth with salt or rinsing your mouth with salt water will help in treating any infections. But there is no scientific evidence that it can cure the cavity. For tooth cavities or any dental problems, it is always advised to take a professional treatment.