How could you get an STD from masterbation? You would have to introduce an infection or virus to your penis for this to occur. For example, if you have warts on your hands it would not be a good idea to masterbate with that rubbing on your penis. What exactly are you afraid of?