Hadithcore
Mishkat al-Masabih, 4078

He reported the Prophet (ﷺ) as saying when an ass which had been branded on its face passed him, “God curse the one who branded it!” Muslim transmitted it.

وَعَنْهُ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَرَّ عَلَيْهِ حِمَارٌ وَقَدْ وُسِمَ فِي وَجْهِهِ قَالَ: «لَعَنَ اللَّهُ الَّذِي وَسَمَهُ» . رَوَاهُ مُسْلِمٌ

References1 variant
In-Book Reference
Book 20, Hadith 15