كتاب الحج
15  
The Book of Pilgrimage
(74)
Chapter: A woman travelling with a Mahram for Hajj and other purposes
(74)
باب سَفَرِ الْمَرْأَةِ مَعَ مَحْرَمٍ إِلَى حَجٍّ وَغَيْرِهِ ‏‏
Sahih Muslim 1338 a

Ibn Umar (Allah be pleased with them) reported Allah's Messenger (ﷺ) as saying:

A woman should not set out on three (days' journey) except when she has a Mahram with her.
حَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، وَمُحَمَّدُ بْنُ الْمُثَنَّى، قَالاَ حَدَّثَنَا يَحْيَى، - وَهُوَ الْقَطَّانُ - عَنْ عُبَيْدِ اللَّهِ، أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ تُسَافِرِ الْمَرْأَةُ ثَلاَثًا إِلاَّ وَمَعَهَا ذُو مَحْرَمٍ ‏"‏ ‏.‏
Reference : Sahih Muslim 1338a
In-book reference : Book 15, Hadith 462
USC-MSA web (English) reference : Book 7, Hadith 3096
  (deprecated numbering scheme)