عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((لَا يَحِلُّ لِامْرَأَةٍ تُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الْآخِرِ تُسَافِرُ يَوْمًا وَلَيْلَةً إِلَّا مَعَ ذِي مَحْرَمٍ مِنْ أَهْلِهَا (وَفِي لَفْظٍ) إِلَّا مَعَ ذِي رَحِمٍ))
It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: It is not permissible for a woman who believes in Allah and the Last Day to travel for one day and night except with a mahram from her family (and in one wording: except with a blood relative).