A woman, 25, was attacked on Sengennydd Road at about 03:00 BST on Friday.
Although it is understood the victim does not study at Cardiff University, its students' union has urged people to take care.
A spokesman said: "Whilst Cardiff is a safe city, we want to emphasise the importance of taking sensible precautions when out at night."
Advice includes planning how to get home ahead of time, staying in pairs when walking at night and sticking to well-lit, populated areas.
South Wales Police is investigating the sex attack.
Students in Cardiff have been given safety advice following a sexual assault in the city.