The Prophet ﷺ said, "A woman should not travel for more than three days except with a Dhi-Mahram (i.e. a male with whom she cannot marry at all, e.g. her brother, father, grandfather, etc.) or her own husband.)"
قُلْتُ لأَبِي أُسَامَةَ حَدَّثَكُمْ عُبَيْدُ اللَّهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ ؓ أَنَّ النَّبِيَّ ﷺ قَالَ لاَ تُسَافِرِ الْمَرْأَةُ ثَلاَثَةَ أَيَّامٍ إِلاَّ مَعَ ذِي مَحْرَمٍ