Mishkat al-Masabih

Ibn ‘Abbas said that the Prophet (ﷺ) had himself cupped when he was wearing the ihram and also when he was fasting. (Bukhari and Muslim.)

وَعَنِ ابْنِ عَبَّاسٍ قَالَ: إِنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ احْتَجَمَ وَهُوَ مُحْرِمٌ وَاحْتَجَمَ وَهُوَ صَائِمٌ