(9) باب بَيَانِ أَنَّهُ يُسْتَحَبُّ لِمَنْ رُئِيَ خَالِيًا بِامْرَأَةٍ وَكَانَتْ زَوْجَةً أَوْ مَحْرَمًا لَهُ
This hadith has been reported on the authority of Safiyya, the wife of Allah's Apostle (ﷺ), through another chain of transmitters (and the words) are:
" She went to Allah's Apostle (ﷺ) to visit him as he was observing I'tikaf in the mosque during Ramadan. She talked with him for some time and then stood up to go back and Allikh's Apostle (ﷺ) stood up in order to bid her good-bye." The rest of the hadith is the same except with the variation of the words that Allah's Apostle (ﷺ) said:" Satan penetrates in man like the penetration of blood (in every part of body)."
Reference: Sahih Muslim 2175 b
In-book reference: Book 39, Hadith 34
USC-MSA web (English) reference(deprecated numbering scheme): Book 26, Hadith 5405