It is narrated from Shaddad bin Aws (may Allah be pleased with him) that he said: During the conquest of Makkah, we were with the Messenger of Allah (peace be upon him). He (peace be upon him) saw a man who had undergone cupping, while eighteen days of Ramadan had passed. The Prophet (peace be upon him) was holding my hand and said: "Both the one who performs cupping and the one who gets cupped have broken their fast."
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 654
Hadith Takhrijاخرجه ابوداود، الصيام، باب في الصائم يحتجم (2369) وابن ماجة ، الصيام، باب ماجاء في الحجامة للصائم (1681) ۔ وصححه الحاكم: (1/ 429 428)۔