This is only allowed on the condition that he can find no one to heat it, or is unable to use the public bathrooms. ‘Amr ibn al-‘Aas narrated that he was participating in an expedition. He had a wet dream during an extremely cold night, and was afraid that if he performed ghusl he would die. He prayed the morning prayer with his companions. He then went to the Messenger of Allah, upon whom be peace, to ask him about this. Muhammad said, “O ‘Amr, did you pray with your companions while you needed a post-nocturnal bath?” ‘Amr mentioned the verse, “Do not kill yourselves, Allah is merciful to you” to the Prophet. The Prophet just laughed and didn’t say anything. (Related by Ahmad, Abu Dawud, al-Hakim, ad-Daraqutni, Ibn Hibban and al-Bukhari in mu’allaq form.) This example illustrated the Prophet’s tacit approval.
Section : If the water is cold enough to physically harm the user.