Sahih al-Bukhari 415
Sahih al-Bukhari · Book 8: Prayers (Salat) · The expiation for spitting in the mosque
Narrated Anas bin Malik:
حَدَّثَنَا آدَمُ ، قَالَ حَدَّثَنَا شُعْبَةُ ، قَالَ حَدَّثَنَا قَتَادَةُ ، قَالَ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ ، قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم " الْبُزَاقُ فِي الْمَسْجِدِ خَطِيئَةٌ، وَكَفَّارَتُهَا دَفْنُهَا " .
The Prophet (ﷺ) said, "Spitting in the mosque is a sin and its expiation is to bury it."