Sayyiduna Abu Sa‘id Khudri (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) said: “A woman should not travel for three days or more except with her father, brother, husband, or a close relative (mahram).”
Hadith Referenceسنن دارمي / من كتاب الاستئذان / 2713
It is prohibited for a woman to undertake any journey without a mahram, even if this journey is for Hajj. The mention of one, two, or three days’ journey is according to the question of the inquirer, and it is not a condition that a woman may travel for a distance less than this; rather, it is absolutely impermissible for a woman to travel without a mahram. The meaning of mahram is her real brother or father, etc., with whom marriage is not permissible, or her husband is with her.