Abu Huraira (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying
It is not lawful for a Muslim woman to travel a night's journey except when there is a Mahram with her.