Jami` at-Tirmidhi, Volume 1, Book 4, Hadith 572 (DarusSalam) ⓘ
Anas bin Malik narrated that : the Messenger of Allah said: "To spit in the Masjid is a sin, and burying it is its atonement."
حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الْبُزَاقُ فِي الْمَسْجِدِ خَطِيئَةٌ وَكَفَّارَتُهَا دَفْنُهَا " . قَالَ أَبُو عِيسَى وَهَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
also referenced under: Hadith 572 (Reference) & Book 6, Hadith 29 (In-Book)