Abdullah bin Abbas reported,

The Prophet ﷺ was cupped on his head while in the state of ihram for an ailment he was suffering from, at a place called Lahy Jamal.In another narration, He was cupped on his head while in the state of ihram due to a migraine he was suffering from.

Azami 11562

Sahih

عن ابن عباس

احتجم النبي ﷺ في رأسه وهو محرم من وجع كان به بماء يقال له: لحي جمل. وفي رواية: احتجم وهو محرم في رأسه من شقيقة كانت به.

الأعظمي 11562صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Medicine
Chapter
Medicine
Section
Cupping for migraine and headache
Numbering
Jami al-Kamil 11562 (2nd edition)
Azami 11562