الإستمناء حرام أي بالكف إذا كان لإستجلاب الشهوة أما إذا غلبته الشهوة وليس له زوجة ولا أمة ففعل ذلك لتسكينها فالرجاء أنه لا وبال عليه كما قاله أبو الليث ويجب لو خاف الزنا كره الظاهر أنها كراهة تنزيه لأن ذلك بمنزلة ما لو أنزل بتفخيذ أو تبطين وقدمنا عن المعراج في باب مفسدات الصوم يجوز أن يستمني بيد زوجته أو خادمته وأنظر ما كتبناه هناك ولا شيء عليه أي من حد وتعزير وكذا من إثم على ما قلناه
رد المحتار على الدر المختار لإبن عابدين كتاب الحدود باب الوطء الذي يوجب الحد والذي لا يوجبه
“Masturbation is forbidden” : that is, with the hand, whenever it is to get one's desire worked up. However, if desire overpowers a man, and he does not have a wife or a servant girl, and he does it to calm the desire, then it is expected that there is no harm to him, as Abu Al-Laith said, it being necessary if he fears adultery.
“Disapproved” : the clear meaning is that it is somewhat disliked, since this is similar to if he had ejaculated by rubbing on someone’s thighs or belly. And we have expounded regarding the night ascent in the section of things that annul the fast: it is permissible for a man to masturbate with the hand of his wife or female servant; refer to what we have written there. “And there is nothing obliged of him” : that is, of any legal punishment or reprimand, and as such, of wrongdoing, according to what we have said.
Ibn ‘Abidin, Radd Al-muhtar ‘ala Al-durr Al-mukhtar [Answer to the Perplexed over the Choicest Pearls], The book of legal punishments [hudud], Section: intercourse that necessitates punishment and that which does not necessitate it