Answered by: Alimah Siddiqa al-Farsiyyah
I flushed the toilet last night and some water gets on my hair. My hair is oily as I have oily skin. The next morning I washed my hair with shampoo to get rid of the impurity from last night. However, I thought that since wetness transfers impurity, the line of impurity goes as such in a chain: 1.impure water from the toilet – 2.oily hair (dry oil becomes liquidized after water washes it) – 3.water that washes hair – 4.shampoo – 5.everywhere in the bathtub and my body! Then I made ghusl and prayed with some shampoos left on my body, especially on my feet.
1. Is the shampoo impure from the chain I described?
2. Is my prayer valid?
3. Next time, if I washed my hair to get rid of impurities, but the hair is a bit oily (my skin is oily), does the impurities got washed away even if there are some slight oils on my hair excreted from the skin? Thank you!
In the name of Allah, Most Gracious, Most Merciful
Based on the principle: “There is no taking into consideration of possibility (wahm)”, the chain you have described of the possibility of impurities still remaining in your shampoo, will not be taken into consideration because it’s merely based on doubt. It seems highly unlikely that the impure sprinkles that may have gotten into your hair from the toilet bowl have still remained in their original impure state. This is similar to the scenario when sprinkles of urine (rashaashul bawl) bounce back to one’s clothing and body after relieving oneself for which shari’ah has dealt with some leniency, and has considered prayer with these sprinkles, as accepted. Therefore, since you had washed with shampoo, anything contained in the shampoo would be classified as a light impurity (najasat khafifah) and your prayer whilst containing such light amount of impurity, would be valid.  Shampoos contain several chemicals such as sulfates that act as cleaning agents in order to purify the hair from impurities and oil, but for more details, I suggest you consult a dermatologist.
Only Allah knows best
Written by Alimah Siddiqa al-Farsiyyah
Checked and approved Mufti Mohammed Tosir Miah
Darul Ifta Birmingham
 al-Hidayah 1/75, al-Misbah