قال أبو محمد رحمه الله فلو عرضت فرجها شيئاً دون أن تدخله حتى ينزل فيكره هذا ولا إثم فيه
وكذلك الاستمناء للرجال سواء سواء لأن مس الرجل ذكره بشماله مباح ومس المرأة فرجها كذلك مباح بإجماع الأمة كلها فإذ هو مباح فليس هنالك زيادة على المباح إلا التعمد لنزول المني فليس ذلك حراماً أصلاً لقول الله تعالى ﴿ وقد فصّل لكم ما حرّم عليكم ﴾ وليس هذا مما فصل لنا تحريمه فهو حلال لقوله تعالى ﴿ خلق لكم ما في الأرض جميعاً ﴾ إلا أننا نكرهه لأنه ليس من مكارم الأخلاق ولا من الفضائل
المحلى لإبن حزم كتاب كتاب مسائل التعزير
Abu Muhammad [Ibn Hazm] (may Allah have mercy on him) said: If a woman displays something to her vagina, without inserting it, until discharging, this is disliked but there is no wrongdoing in it.
Similarly masturbation for men, since it is permissible for a man to touch his penis with his left hand; so for a woman to touch her vagina is likewise permissible by universal consensus of the ummah. And since it is permissible, the only thing beyond what is permissible is the intentional discharge of semen. In principle this is not unlawful, in view of the word of Allah the Exalted: { He has explained to you all what He has made unlawful for you } [Al-An'am 119]; this is not something that He has explained to us as unlawful, and it is therefore permitted, in view of the word of the Exalted: { He has created all that is on Earth for you all } [Al-baqara 29]; except that we dislike it since it is not a noble moral deed nor is it a virtue.
Ibn Hazm, Al-muhalla bi Al-athar [Sweetened by the Outcomes/Historical Accounts], The book of matters of discretionary punishment [ta'zir]