“Yes it is permissible for pilgrims to wear medical masks during the rites to protect themselves from airborne infectious diseases; this is considered an indispensable necessity for some of them. A pilgrim who wears a medical mask is not obliged to offer expiation. This is because there is a difference of opinion amongst the scholars on the ruling on covering the face during Hajj.
According to the Shafi'ites and Hanbalites, it is permissible to cover one's face without the need of expiation. Imam al- Shirazi in his renowned book "al- Muhadhab" permitted the covering of the face and so did Imam al-Nawawi.
Therefore, it is permissible to follow the opinion of scholars maintaining permissibility due to necessity and because the preservation of life is one of the objectives of Islamic law.”
“In cases of necessity, there is nothing wrong with the pilgrim in ihram wearing a mask, such as if he has an allergy in his nose and he needs to wear a mask, or if he is passing through thick smoke and needs to wear a mask, or he is passing by smell and needs to wear a mask. There is nothing wrong with that.” End quote.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 22/130, 131