this hadith states:
“Whatever Allah has permitted in His Book is halal, whatever He has forbidden is haram, and whatever He was silent about is pardoned, so accept the pardon of Allah, for Allah was not forgetful."
Then he recited this verse: ‘and your Lord is never forgetful’ [Maryam 19:64].” This hadith was classed as sahih by Shaykh al-Albaani (may Allah have mercy on him) in al-Silsilah al-Saheehah (5/325), and classed as hasan on p. 14 of Ghaayat al-Maraam.
and regarding the ayah:
"And they who guard their private parts Except from their wives or those their right hands possess, for indeed, they will not be blamed -But whoever seeks beyond that, then those are the transgressors." [23:5-7]
isn't it possible that when Allah (SWT) said nothing about masturbation it means that he is gonna pardon the act of masturbation because it never EXPLICITLY states masturbation, just actions with another person.