عن الحسن قال إذا خرج من دبر الانسان الدود أو الدودة فعليه الوضوء
المصنف لإبن ابي شيبة كتاب الطهارة
From Al-Hasan, who said: If a worm or worms come out of a man's rear, then it is obligatory for him to perform ablution.
Ibn Abi Shayba, Al-musannaf, The book of purity