Assalamu aleykum, M
Assalamu aleykum,
Masturbation is undoubtedly a sin in Islam and it is not permitted in any circumstances.
As this verse of the Holy Qur’an states:
"And those who guard their chastity (i.e. private parts, from illegal sexual acts). Except from their wives or (the captives and slaves) that their right hands possess, - for them, they are free from blame. But whoever seeks beyond that, then those are the transgressors." (23:5-7)
To research further the Islamic view about masturbation and its consequences, please refer to the following texts: