intrusive thought

unwelcome involuntary thought, image, or unpleasant idea that may become an obsession