It is reported from the Prophet ﷺ with the same meaning that he said, "When someone steps on something filthy with his leather socks, the earth purifies them."
حدثنا أحمد بن إبراهيم حدثني محمد بن كثير يعني الصنعاني عن الأوزاعي عن ابن عجلان عن سعيد بن أبي سعيد عن أبيه
عن النبي ﷺ بمعناه قال إذا وطئ الأذى بخفيه فطهورهما التراب
No references are available.
Its isnad is daif. Hakim narrated it, 1/166, from the hadith of Muhammad bin Kathir Sanani, through this route. Ibn Khuzayma graded it sahih, no. 292, and so did Ibn Hibban, no. 248. See the preceding hadith.