Wa`alaykum as-salam wa rahmatullahi wa barakatuh.
While we are to do our best to avoid foods that are doubtful, there is no need for us to be overly rigid on this issue, especially when it comes to medicines.
For further clarification, let me cite here part of my answer to a similar question in another forum:
“Suppose some haram elements such as gelatin or by-products of pork went to the production of medicine, it is still considered halal; for these ingredients have been wholly transformed and turned into a different substance altogether. It is known as the principle of Istihalah or transformation of a product into something else. An example: Alcohol is haram, but once it has become vinegar, it is undoubtedly halal. The same rule applies to substances that were once haram – if they have been changed – acquiring new attributes and names.
Imam Ibn al-Qayyim states: The texts forbidding dead carcasses, blood, the flesh of swine and intoxicants, cannot be extended to crops, fruits, ashes, salt, mud, vinegar – even though the latter may have their source in the former as their base or used as compost.
Furthermore, even if we are to assume that that Gelatine in most medicines comes from pigs, you are allowed to take the medication – if alternatives are not available. Such is the ruling based on the rule of umum al-balwa which jurists use; accordingly, where something is unavoidable, it can be considered as permissible.
In conclusion, you should have no reservation in using the medication prescribed by your physician…”
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.