A woman does not have to undo her hair when she does ghusl following janaabah, but she must make sure that the water reaches all parts of her body, including the hair and its roots.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) was asked:
Some women braid their hair and when they do ghusl following janaabah they do not undo their braids. Is their ghusl valid? Please note that the water does not reach all the roots of their hair. Please advise us, may Allaah reward you with good.
If a woman pours water over her head, that is sufficient, because Umm Salamah (may Allaah be pleased with her) asked the Prophet (peace and blessings of Allaah be upon him) about that. She said: I am a woman with braided hair; should I undo it when doing ghusl for janaabah? He said: “No, rather it will be sufficient for you to pour three handfuls of water on your head, then pour water over yourself and you will be purified.” Narrated by Imam Muslim in his Saheeh.
So if a woman pours water on her head three times, that will be sufficient and she does not need to undo the braids, because of this saheeh hadeeth.
Majmoo’ Fataawa al-Shaykh Ibn Baaz, 10/182
Shaykh Ibn Baaz also said:
With regard to the greater purification (i.e., ghusl), it is essential to pour water over the head three times, and wiping is not sufficient, because of the report narrated in Saheeh Muslim… then he mentioned the hadeeth of Umm Salamah which is quoted above.
Majmoo’ Fataawa al-Shaykh Ibn Baaz, 10/161.
Ibn al-Qayyim said in Tahdheeb al-Sunan:
This hadeeth of Umm Salamah indicates that women do not have to undo their hair in order to do ghusl following janaabah. The scholars were agreed on this point, except for the reports narrated from ‘Abd-Allaah ibn ‘Amr and Ibraaheem al-Nakha’i who said that she has to undo it, but we do not know of anyone else who agrees with them. End quote.
Shaykh Ibn ‘Uthaymeen said:
The least that is required is that she should make the water reach every part of her body, even underneath the hair. It is best if it is done in the manner described in the hadeeth of the Prophet (peace and blessings of Allaah be upon him), when Asma’ bint Shakl asked him about ghusl following menses. He (peace and blessings of Allaah be upon him) said: “One of you should take her water and lotus leaves and purify herself and purify herself well. Then she should pour water over her head and rub it vigorously, so that it reaches the roots of her hair, and pour water over herself. Then she should take a piece of cloth that is scented with musk and purify herself with it.” Asma’ said: “How should she purify herself with it?” He said: ‘Subhaan Allaah, let her purify herself with it.” ‘Aa’ishah said to her: “She should follow the traces of blood.”
Narrated by al-Bukhaari and Muslim.
It is not necessary to undo the braids unless they are so tightly done that there is the fear that the water will not reach the roots of the hair, because of the hadeeth of Umm Salamah (may Allaah be pleased with her) which is narrated in Saheeh Muslim… Then he mentioned the hadeeth which we have quoted above.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 11/318, 319
And Allaah knows best.