The Prophet ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to travel for a day except in the company of a Muharram relative."
حدثنا يحيى عن ابن أبي ذئب قال حدثني سعيد بن أبي سعيد عن أبيه
عن النبي ﷺ قال لا يحل لامرأة تؤمن بالله واليوم الآخر تسافر يوما إلا مع ذي محرم
Its chain of transmission is sahih. It has already appeared in 2/236–251, and Bukhari related it in 2/54, in the chapter on shortening the prayer, on how much travel warrants shortening the prayer, from Ibn Abu Dhib with this chain. Muslim also related it in 2/975, number 1338, in the book of Hajj, on a woman traveling with a mahram, from Ibn Umar.