The Messenger of Allah ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to travel a journey of three days or more unless she is accompanied by her father, her brother, her husband, her son, or another Muharram relative."
حدثنا عثمان بن أبي شيبة وهناد أن أبا معاوية ووكيعا حدثاهم عن الأعمش عن أبي صالح
قال رسول الله ﷺ لا يحل لامرأة تؤمن بالله واليوم الآخر أن تسافر سفرا فوق ثلاثة أيام فصاعدا إلا ومعها أبوها أو أخوها أو زوجها أو ابنها أو ذو محرم منها
Muslim narrated it in Sahih Muslim, Hajj, chapter on a woman traveling with a mahram for Hajj or other purposes, hadith no. 1340, from the hadith of Abu Muawiya al-Darir, with this wording.