Imam Shawkaani rahimahullah said:

“Those who took the opinion that it is allowed for a menstruating woman to enter the masjid and that she is not prevented except for fear from what is in it (that is mensturation) was Zaid ibn Thabit and Khataabi quoted it from Malik and Shafiee and Ahmad and people of Dhaahir. And those who prevented her from entering are Sufyaan and the people of opinion and it is well-known from the mathab of Malik” [Nayl al-Awtaar]

This is also the view of Imam ibn Hazm rahimahullah in al-Muhallah and he explains in a lengthy passage. Also, Imam Al-Albani rahimahullah takes the view that a menstruating can enter the masjid unconditionally as he mentions in his book Thamr al-Mustataab and his book Tamam al-Minna.

The hadith of Aisha radiallahu anaha Bukhari and others is the basis for this opinion as well as the following athar:

عطاء بن يسار قال: ((رأيت رجالاً من أصحاب رسول الله يجلسون في المسجد وهم مجنبون إذا توضئوا وضوء الصلاة)

Ataa ibn Yasaar said: I saw men from the Companions of the Messenger of Allah sitting in the masjid and they were junub, if they made wudu like the wudu of salah.

[This narration is Saheeh mentioned in the book Sunan of Sa’eed ibn Mansoor graded authentic by Mustafa al-‘Adawi in his book Ahkaam an-Nisaa]

So some scholars allowed it only if they made wudu like the wudu of Salah. But as seen below Imam Ahmad and Ishaaq did not put such a condition, they allowed her to enter unrestricted. Nonetheless, it is clear evidence they were in a masjid without making ghusl, so therefore a menstruating woman likewise.

Imam Bagahwi rahamihullah said in Sharhus-sunnah: And Ahmad and Ishaaq (ibn Rahawaya) allowed a woman to remain the masjid…”

Allah knows best

Translated by
Faisal ibn Abdul Qaadir ibn Hassan
Abu Sulaymaan