Hazrat Ibn Abbas (may Allah be pleased with both of them) said that the one who masturbates is committing fornication with himself.