It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Beware! No man should spend the night with a woman, except one who is married to her or is a mahram."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13561
Abu Sa'id al-Khudri (may Allah be pleased with him) narrated that the Prophet (peace and blessings be upon him) said: "No woman should travel alone for three days or more, unless her father, or son, or brother, or husband, or some other mahram is with her."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13562