The student was walking home from a friend's house on Sunday night when she was grabbed from behind, gagged and taken to a place where she was attacked and raped, a forensic expert said on Monday.
She was rescued and taken to hospital at around midnight on Sunday.
Kazi Sahan Haque, the police chief at Kurmitola Police Station, said authorities recorded a case filed by the victim's father and were investigating.
Rape and violence against women have been described as frequent occurrences in Bangladesh. Non-governmental human rights watchdog Ain O Salish Kendra reported that at least 1,351 women were raped in Bangladesh between January and November 2019.
At least 66 of the women were murdered after the rape, the organization said. The condition of Sunday's victim is unknown.