Abu Bakra reported,

A man was mentioned in the presence of the Prophet ﷺ, and another man praised him highly. The Prophet ﷺ said, "Woe to you, you have cut off your companion's neck!" repeating it several times. Then he said, "If one of you must praise someone, let him say, 'I reckon him to be such and such,' if he truly believes that to be so, and his reckoner is Allah. And let no one declare anyone pure before Allah."Wahib reported it from Khalid with the wording "Woe to you" instead.

Bukhari 6061

Sahih

حدثنا آدم حدثنا شعبة عن خالد

عن عبد الرحمن بن أبي بكرة عن أبيه

أن رجلا ذكر عند النبي ﷺ فأثنى عليه رجل خيرا فقال النبي ﷺ ويحك قطعت عنق صاحبك يقوله مرارا إن كان أحدكم مادحا لا محالة فليقل أحسب كذا وكذا إن كان يرى أنه كذلك وحسيبه الله ولا يزكي على الله أحدا قال وهيب عن خالد ويلك

البخاري 6061صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Manners
Chapter
What is disliked of mutual praise
Numbering
Darussalam 6061
Bukhari 6061