To dream of getting a cavity in your tooth is sometimes a warning that your health is at risk.

The other possible meaning is, you have uttered some false or mean words and those words are coming back to haunt you.