From Sahih Muslim (Hadith 3260):
Abdullah b. Umar (Allah -be pleased with them) reported Allah's Apostle (ﷺ) as saying:It is not lawful for a woman who believes in Allah and the Hereafter to travel for more than three nights journey except when there is a Mahram with her
Reference: Muslim 3260