Purity: Touching the Hair of a Corpse
Practical Laws of Islam as per the teachings of Ayatullah Sistani
Ruling 512:
If a person makes his hair touch a corpse, or he makes his body touch the hair of a corpse, or he makes his hair touch the hair of a corpse, then performing this ghusl is not obligatory for him.
-Ayatullah Sistani, Practical Laws of Islam, Purification (Taharah)


