The Prophet ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to travel a distance of a day and a night without a male relative accompanying her."Yahya bin Abu Kathir, Suhayl, and Malik narrated it similarly from al-Maqburi from Abu Hurairah .
حدثنا آدم قال حدثنا ابن أبي ذئب قال حدثنا سعيد المقبري عن أبيه
قال النبي ﷺ لا يحل لامرأة تؤمن بالله واليوم الآخر أن تسافر مسيرة يوم وليلة ليس معها حرمة تابعه يحيى بن أبي كثير وسهيل ومالك عن المقبري عن أبي هريرة رضي الله عنه
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.