The Qur’an and Sunnah give guidelines concerning the promotion of physical health of humans. A Muslim is required by Islam to take all the necessary steps to keep himself away from diseases and to keep himself physically fit. The Prophet (peace and blessings be upon him) is reported to have said, “Allah has sent down the disease and the cure, and for every disease there is a cure. So take medicine but do not use anything haram as medicine.” (Reported by Abu-Dawud)
In this regard, we would like to cite for you the following fatwa issued by the late Saudi scholar Sheikh `Abdul-`Aziz Ibn Baz (may Allah bless his soul), in which he states the following:
“There is nothing wrong in giving preventive treatment if there is a fear that the disease may occur because of the presence of an epidemic or other factors that may cause diseases. Also, there is nothing wrong with giving medicine to ward off the feared disease, because the Prophet (peace and blessings be upon him) is reported to have said, “Whoever eats seven dates of Madinah in the morning will not be harmed by witchcraft or poison.” This is a kind of warding off a problem before it happens. So if there is a fear of sickness and a person is vaccinated against an infection that is present in the land or elsewhere, there is nothing wrong with that because it is a kind of protection.”
With regard to the harm suffered by those who are given some vaccinations, namely a short-lived fever or other side-effects, these drawbacks may be overlooked when compared with the great harm that is warded off, namely the diseases that may kill or cause great harm to a person’s health.
The general principle of Shari`ah concerning this matter is that the lesser of two evils may be done in order to ward off the greater one, if it is necessary to do one of them. (Al-Ashbah wal-Naza’ir by Al-Subki, 1/45)
However, if it is medically proven that a specific vaccine harms the body or that its harmful effects outweigh its positive effects of warding off disease, then it is not permissible to use it because the Prophet (peace and blessings be upon him) is reported to have said, “There should be neither harm nor reciprocating harm.”