BackgroundThe prevalence of sexually transmitted infections (STIs) remains alarming, especially among young people and college students, highlighting the vulnerability of this population. In the academic context, it is worth investigating whether medical students, despite their access to information, also engage in risky sexual behaviors.ObjectiveThe present study aims to describe the sexual behavior of Brazilian medical students, analyzing their level of knowledge about HIV/AIDS and other STIs, as well as examining potential correlations between this knowledge and risky behaviors.MethodsThis cross-sectional study was conducted with 193 medical students from a private institution in Salvador, Bahia, Brazil, using a structured, anonymous, self-administered online questionnaire. The questionnaire was adapted from the Brazilian Knowledge, Attitudes, and Practices Survey and a survey on risk behavior and knowledge among university students. Knowledge about STIs and HIV/AIDS was classified as “good” (above 70% correct answers), “average” (50–70% correct answers), and “poor” (below 50% correct answers). The work has been approved by the institutional review board of Bahiana School of Medicine and Public Health.ResultsA total of 77.7% of the students exhibited risky sexual behavior, which was associated with the number of partners (p = 0.0001), engaging in sexual activity within the last 12 months (p = 0.001), lack of a steady partner (p = 0.001), not using condoms during the last sexual encounter with a steady partner (p = 0.0001), and the use of substances such as alcohol (p = 0.0001), marijuana (p = 0.0001), and cigarettes (p = 0.0001) during sexual activity. Most students demonstrated poor (49.2%) or average (48.7%) knowledge about STIs and HIV/AIDS, a pattern that persisted regardless of sexual behavior. Only not using condoms during sexual encounters with casual partners in the past 12 months (p = 0.021) was associated with low levels of knowledge.ConclusionThe prevalence of risky sexual behaviors in this sample was high, as was the low level of knowledge about STIs. However, knowledge of STIs and HIV/AIDS does not appear to be the sole determinant of these behaviors.