Reference: al-Muntaqaa min Fataawa Shaykh Saalih al-Fowzaan – Volume 5, Page 26, Fatwa No.33
Question: What is the ruling regarding a menstruating woman entering the masjid, and likewise al-Masjid al-Haraam [in Makkah]?
Response: It is not permissible for a menstruating woman to sit in the masjid, not al-Masjid al-Haraam and nor other than it from the masaajid, because the Prophet ﷺ prohibited the menstruating woman from staying in the masjid [Sunan Abee Daawood (1/58) the hadeeth of ‘Aa.ishah (radhi-yAllaahu ‘anhaa)], however, it is permissible for her to pass through the masjid to get something or put something [down] or ask a question regarding something.