We all get them but we just don't like to admit it. I get more than my fair share after years of experience working with clients who do! My brain has a large database of possible thoughts and images. This includes thoughts of being harmed or harming other people, doing or saying embarrassing things and many more.
It is not the thought that is the problem. It is what you think about them and then what you do in reaction to them. If you want to be troubled by increasingly frequent and disturbing thoughts follow these rules:
Believe you shouldn't get thoughts like this and that it means you are mad,bad or dangerous.
The problem is if you try to escape a thought your mind sees it as dangerous, looks out for it and brings it back. The harder you try not to think something ( like pink elephants) the more you will think of it. CBT teaches you how to change this behavior and how to accept the thoughts as unimportant "mental junk". Once your brain sees it as boring it will fade away like NY other background noise.
I have been working as a therapist for 28 years. I specialize in treating Obsessive Compulsive Disorder, Body Dysmorphic Disorder and Health Anxiety