Imam an-Nawawi, may Allah have mercy upon him, in the commentary of the Muhazzab said:
Our ashāb differed on whether or not, in these times the offensiveness is makrūh or harām. The first wajh it is makrūh. This is the opinion affirmed by a group clearly. Amongst them is al-Bandaniji at the end of the chapter on prayer with filth. The second, which is the aśah is that it is harām due to the establishment of the hadīths of its prohibition as thābit and the legal maxim is: the aśl (origin) of prohibition is it’s forbiddance (harām).
Al-Mawardi in his book al-Iqnā’ , the author of aź-Źakhāir and others had previously affirmed clearly of it being haram.