These two activities have very low risk for HIV transmission. The risk is considered more theoretical than real, which means in the real world we do not see the virus being spread this way.
There are some STIs that can be spread when you receive oral sex. Men can be at some risk for Chlamydia, Gonorrhea, Syphilis, Herpes, HPV and, possibly Hepatitis B if they have not been vaccinated and women can be at some risk for Syphilis, Herpes, HPV and again possibly Hepatitis B if not vaccinated.
Using a condom for oral sex involving a penis or a dental dam for oral sex involving a vagina or anus can reduce the risk of these infections. Keep in mind that Syphilis, Herpes and HPV are spread through skin to skin contact, so only areas that are covered by the barrier are protected. Check out our pages on condoms and other barriers for more information on their use to reduce infections.
Mutual masturbation does have a low risk for transmission of Syphilis, Herpes and HPV. These are infections that are transmitted through skin to skin contact but are not commonly passed this way. If you are concerned about this low risk, medical gloves can be worn.
Have a look at our “Know your chances” web page, it provides information on your chances of getting or passing an STI depending on how you are having sex.
Please leave a comment to let us know if this answers your question or if you need more information.
For other readers, please feel free to leave a comment, or let us know if this was helpful.