Sayyiduna Thawban (may Allah be pleased with him) narrated that the Messenger of Allah (peace and blessings be upon him) was going towards Baqi‘ when he saw a man being cupped. He said: "The one who does cupping and the one who gets cupped, their fast is broken." Imam Darimi (may Allah have mercy on him) said: I avoid cupping while fasting in Ramadan. Imam Darimi (may Allah have mercy on him) was asked: Do you say this, that one should avoid cupping while fasting? He replied: Yes.
The position of Imam Ahmad rahimahullah and others is that cupping (hijamah) breaks the fast. Some people have said that it does not break the fast, but the correct opinion is that of Imam Ahmad rahimahullah. The fast of the one performing cupping is broken because there is a possibility that blood may enter the mouth, and the fast of the one receiving cupping is broken because there is a possibility of weakness, and if weakness occurs, one may be compelled to break the fast. The same ruling applies to voluntary blood donation (tabarru‘ bil-dam), that is, giving blood to someone; it is better not to have blood drawn while fasting, as is narrated from Imam Darimi rahimahullah.