Jabir bin Abdullah reported,

The Messenger of Allah ﷺ said, "No man shall spend the night at the home of a previously married woman unless he is her husband or a close relative she cannot marry."

Azami 6432

Sahih

عن جابر قال

قال رسول الله ﷺ: ألا لا يبيتن رجل عند امرأة ثيب، إلا أن يكون ناكحا، أو ذا محرم.

الأعظمي 6432صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Rights and duties of the Muslim woman, and good treatment of her
Section
Prohibition of seclusion with a non-mahram woman
Numbering
Jami al-Kamil 6432 (2nd edition)
Azami 6432