The Prophet ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to travel a distance of one day except in the company of a Muharram relative."
حدثني زهير بن حرب حدثنا يحيى بن سعيد عن ابن أبي ذئب حدثنا سعيد بن أبي سعيد عن أبيه
عن النبي ﷺ قال لا يحل لامرأة تؤمن بالله واليوم الآخر تسافر مسيرة يوم إلا مع ذي محرم
Both of them (Bukhari and Muslim) reported the hadith of Ibn Abu Dhib, from Saeed, from his father, from Abu Hurairah, from the Prophet, may Allah's blessings and peace be upon him and his family, "It is not permissible for a woman to travel without a mahram with her," the hadith continuing.Muslim added, from Layth, from Saeed, similarly, and said that Malik, Yahya bin Abu Kathir, and Suhayl had also reported it, from Saeed, from Abu Hurairah.