The Jews used to say to the Messenger of Allah ﷺ, "Sam alayka," then say to themselves, "Why does Allah not punish us for what we say?" [Mujadilah 58:8]. So this verse was revealed, "When they come to you, they greet you with that with which Allah does not greet you" [Mujadilah 58:8], to the end of the verse.
حدثنا عبد الصمد حدثنا حماد عن عطاء بن السائب عن أبيه
أن اليهود كانوا يقولون لرسول الله ﷺ سام عليك ثم يقولون في أنفسهم {لولا يعذبنا الله بما نقول} فنزلت هذه الآية {وإذا جاءوك حيوك بما لم يحيك به الله} إلى آخر الآية
Its isnad is sahih. Hammad is Ibn Salama. Ibn Kathir mentioned this hadith in his tafsir 8:261, citing this same passage, and said, "A hasan isnad, and the compilers of the Six Books did not include it," meaning the authors of the six major hadith collections.It also appears in Majma al-Zawaid 7:121-122, where it is said, "Ahmad, Bazzar, and Tabarani narrated it, and its isnad is good, because Hammad heard from Ataa while he was still sound of memory." I say, this makes it a sahih isnad, as we have stated.Suyuti also attributed it in Durr Manthur 6:184 to Abd bin Humayd, Ibn Munzir, Ibn Mardawayh, and Bayhaqi in Shuab al-Iman.