Common warts are also infectious in nature and can be spread to the entire body through sexual and non-sexual contacts. So, it can be spread throughout the body through masturbation process. Using barrier methods for sex, like condoms can prevent the spread of virus and thereby prevent the spread of warts, but it also do not ensure 100% protection from HPV infections. Hope your query is answered.