(27) The Book of Oaths
كتاب الأيمان
(8) Chapter: Treatment of slaves, and the expiation of one who slaps his slave
(8) باب صُحْبَةِ الْمَمَالِيكِ وَكَفَّارَةِ مَنْ لَطَمَ عَبْدَهُ ‏‏
Sahih Muslim 1659 e 

This hadith has been narrated on the authority of Shu'ba with the same chain of transmitters, but made no mention of (these words) of his:

I seek refuge with Allah, I seek refuge with Allah's Messenger (ﷺ).
وَحَدَّثَنِيهِ بِشْرُ بْنُ خَالِدٍ، أَخْبَرَنَا مُحَمَّدٌ، - يَعْنِي ابْنَ جَعْفَرٍ - عَنْ شُعْبَةَ، بِهَذَا الإِسْنَادِ وَلَمْ يَذْكُرْ قَوْلَهُ أَعُوذُ بِاللَّهِ أَعُوذُ بِرَسُولِ اللَّهِ صلى الله عليه وسلم ‏.‏
Reference : Sahih Muslim 1659e
In-book reference : Book 27, Hadith 57
USC-MSA web (English) reference : Book 15, Hadith 4089
  (deprecated numbering scheme)