The Messenger of Allah (ﷺ) put out from the mosque his head for me as he was in I'tikaf, and I washed it in the state that I was menstruating.
Sahih Muslim Book 3, Hadith 8