Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:568Abū ʿAbdullāh al-Ḥāfiẓ And ʾAbū Saʿīd b. Abū ʿAmr > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Ibrāhīm b. Munqidh > Idrīs b. Yaḥyá > al-Faḍl b. al-Mukhtār > Ibn Abū Dhiʾb > Shuʿbah / a freed slave of Ibn ʿAbbās > Ibn ʿAbbās

[Machine] The Messenger of Allah ﷺ said, "Wudu is made from what comes out, not what goes in." And it is narrated from Ata ibn Abi Rabah that he said about the one who performs wudu and a worm comes out of his anus, "Wudu is still valid." And Hasan and a group also said the same.  

البيهقي:٥٦٨أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ وَأَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو قَالَا نا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا إِبْرَاهِيمُ بْنُ مُنْقِذٍ حَدَّثَنِي إِدْرِيسُ بْنُ يَحْيَى حَدَّثَنِي الْفَضْلُ بْنُ الْمُخْتَارِ عَنِ ابْنِ أَبِي ذِئْبٍ عَنْ شُعْبَةَ يَعْنِي مَوْلَى ابْنِ عَبَّاسٍ عَنِ ابْنِ عَبَّاسٍ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ الْوُضُوءُ مِمَّا خَرَجَ وَلَيْسَ مِمَّا دَخَلَ وَرُوُّينَا عَنْ عَطَاءِ بْنِ أَبِي رَبَاحٍ أَنَّهُ قَالَ فِي الَّذِي يَتَوَضَّأُ فَيَخْرُجُ الدُّودُ مِنْ دُبُرِهِ قَالَ عَلَيْهِ الْوُضُوءُ وَكَذَلِكَ قَالَ الْحَسَنُ وَجَمَاعَةٌ