Sahih Muslim
552.01

Anas b. Malik reported:The Messenger of Allah (ﷺ) said: Spitting in a mosque is a sin, and its expiation is that it should be buried

552.02

Shu'ba reported:I asked Qatada about spitting, in the mosque. He said: I heard Anas b. Malik say: I heard the Messenger of Allah (ﷺ) say: Spitting in the mosque is a sin, and its expiation is that it should be buried