كتاب الطلاق
18
The Book of Divorce
(3)
Chapter: Expiation must be offered by one who declares his wife to be unlawful for him but does not intend divorce thereby
(3)
باب وُجُوبِ الْكَفَّارَةِ عَلَى مَنْ حَرَّمَ امْرَأَتَهُ وَلَمْ يَنْوِ الطَّلاَقَ ‏‏
Sahih Muslim 1473 b

Ibn Abbas (Allah be pleased with them) reported:

When a man declares his wife unlawful for himself that is an oath which must be atoned, and he said: There is in the Messenger of Allah (ﷺ) a noble pattern for you.
حَدَّثَنَا يَحْيَى بْنُ بِشْرٍ الْحَرِيرِيُّ، حَدَّثَنَا مُعَاوِيَةُ، - يَعْنِي ابْنَ سَلاَّمٍ - عَنْ يَحْيَى، بْنِ أَبِي كَثِيرٍ أَنَّ يَعْلَى بْنَ حَكِيمٍ، أَخْبَرَهُ أَنَّ سَعِيدَ بْنَ جُبَيْرٍ أَخْبَرَهُ أَنَّهُ، سَمِعَ ابْنَ عَبَّاسٍ، قَالَ إِذَا حَرَّمَ الرَّجُلُ عَلَيْهِ امْرَأَتَهُ فَهْىَ يَمِينٌ يُكَفِّرُهَا وَقَالَ ‏{‏ لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ‏}
Reference : Sahih Muslim 1473 b
In-book reference : Book 18, Hadith 26
USC-MSA web (English) reference : Book 9, Hadith 3495
  (deprecated numbering scheme)