This is a matter of significant scholarly discussion. The Prophet (peace be upon him) 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 Hajj. If a woman has no mahram willing and able to travel with her, Hajj is not obligatory upon her according to these schools.
Sheikh Ibn Baz and Sheikh Ibn Uthaymeen both held the position that a mahram is required for a woman traveling for Hajj, and that without a mahram, the obligation of Hajj does not apply to her. If she dies without having performed Hajj 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 obligatory Hajj with a group of trustworthy women, even without a mahram, provided that safety is ensured. Imam al-Nawawi reported the Shafi'i position that a mahram is not a condition for the obligation of Hajj if the woman can travel safely with trustworthy companions. The Saudi Ministry of Hajj now permits women aged 45 and above to perform Hajj without a mahram if traveling with an organized group.