كتاب الصلاة
4  
The Book of Prayers
(30)
Chapter: Women Going Out To The Masjid So Long As No Fitnah Results From That; and They Should Not Go Out Wearing Perfume
(30)
باب خُرُوجِ النِّسَاءِ إِلَى الْمَسَاجِدِ إِذَا لَمْ يَتَرَتَّبْ عَلَيْهِ فِتْنَةٌ وَأَنَّهَا لاَ تَخْرُجُ مُطَيَّبَةً
Sahih Muslim 442 e

Ibn 'Umar reported:

The Messenger of Allah (ﷺ) said: Do not prevent women from going to the mosque at night. A boy said to 'Abdullah b. Umar: We would never let them go out, that they may not be caught in evil. He (the narrator) said: Ibn Umar reprimanded him and said.. I am saying that the Messenger of Allah (ﷺ) said this, but you say: We would not allow!
حَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ مُجَاهِدٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَمْنَعُوا النِّسَاءَ مِنَ الْخُرُوجِ إِلَى الْمَسَاجِدِ بِاللَّيْلِ ‏"‏ ‏.‏ فَقَالَ ابْنٌ لِعَبْدِ اللَّهِ بْنِ عُمَرَ لاَ نَدَعُهُنَّ يَخْرُجْنَ فَيَتَّخِذْنَهُ دَغَلاً ‏.‏ قَالَ فَزَبَرَهُ ابْنُ عُمَرَ وَقَالَ أَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَتَقُولُ لاَ نَدَعُهُنَّ ‏.‏
Reference : Sahih Muslim 442e
In-book reference : Book 4, Hadith 154
USC-MSA web (English) reference : Book 4, Hadith 888
  (deprecated numbering scheme)