This is a matter of significant scholarly discussion. النبي (صلى الله عليه وسلم) stated clearly that no woman should travel without a mahram, and this is the basis for the Hanafi and Hanbali position that a mahram is an absolute condition for a woman's obligation of الحج. If a woman has no mahram willing and able to travel with her, الحج is not واجب upon her عند these schools.
الشيخ ابن باز and الشيخ ابن عثيمين both held the position that a mahram is required for a woman traveling for الحج, and that without a mahram, the obligation of الحج does not apply to her. If she dies without having performed الحج due to the absence of a mahram, she is not sinful. They considered the mahram to be part of the conditions of istitaa'ah (ability) for women.
However, the Shafi'i and Maliki schools hold a different position. They permit a woman to travel for واجب الحج with a group of trustworthy women, even without a mahram, provided that safety is ensured. الإمام النووي reported the Shafi'i position that a mahram is not a condition for the obligation of الحج if the woman can travel safely with trustworthy companions. The Saudi Ministry of الحج now permits women aged 45 and above to perform الحج without a mahram if traveling with an organized group.