قرآن ﴿ هم العادون ﴾ المتعدون لحدود الله الكاملون في العدوان المتناهون لأنه من عدا عليه إذا تجاوز الحد في الظلم ودخل فيه حرمة وطئ الذكران والبهائم والزنى وقيل يدخل فيه الاستمناء أيضاً روي أن العرب كانوا يستمنون في الأسفار فنزلت الآية وفي الحديث ومن لم يستطع أي التزوج فعليه بالصوم إستدل به بعض المالكية على تحريم الاستمناء لأنه عليه السلام أرشد عند العجز عن التزوج إلى الصوم الذي يقطع الشهوة فلو كان الإستمناء مباحاً لكان الإرشاد إليه أسهل وقد أباح الإستمناء طائفة من العلماء وهو عند الحنابلة وبعض الحنفية لأجل تسكين الشهوة جائر وفي رواية الخلاصة الصائم إذا عالج ذكره حتى أمنى يجب عليه القضاء ولا كفارة عليه ولا يحل هذا الفعل خارج رمضان إن قصد قضاء الشهوة وإن قصد تسكين شهوته أرجو أن لا يكون عليه وبال
روح البيان في تفسير القران لاسماعيل حقي المعارج ٣١
{ Those are the transgressors } : those who overstep the limits of Allah, those complete in transgression, those who are in excess; because these are those who act in hostility to Him whenever they overstep the limit in wrongdoing. This includes intercourse with males and animals, and adultery; it is said that it also includes masturbation. It is related that the Arabs used to masturbate on their journeys, and so this verse came down. Regarding the hadith "Whoever is unable – that is, to marry – is obliged to fast" : some of the Maliki school have inferred from this that masturbation is forbidden, since He (peace be upon him), when people were unable to marry, advised them to fast which would quell the desire. If masturbation were permissible, advising it would be easier. A group of scholars made masturbation permissible, including those of the Hanbali school and some of the Hanafi school, on account of the fact that subduing the desire is permissible. In the above-excerpted narration, the one fasting, if he handles his penis until he ejaculates, judgment is to be pronounced on him but no atonement is obliged. This act is not permissible outside of Ramadan if he intends to fulfill the desire, but if he intends to subdue the desire, I would expect no harmful consequence for him.
Ismail Haqqi, Ruh Al-Bayyan fi Tafsir Al-Qur'an [The Spirit of Elucidation in Exegesis of the Qur'an], Al-ma'arij 31