Sunan an-Nasa'i, Volume 1, Book 8, Hadith 724 (DarusSalam)

It was narrated that Anas said: "The Messenger of Allah said: 'Spitting in the Masjid is a sin, and its expiation is to bury it.'"

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ قَتَادَةَ، عَنْ أَنَسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ الْبُصَاقُ فِي الْمَسْجِدِ خَطِيئَةٌ وَكَفَّارَتُهَا دَفْنُهَا ‏" ‏ ‏.‏

sunnah.com