The Prophet صلى الله عليه وسلم said:
A man should not look at the nakedness of another man and a
woman should not look at the nakedness of another woman. A
man should not lie with another man under a single blanket and
a woman should not lie with another woman under a single
blanket.
Muslim, Ṣaḥīḥ Muslim, 1:266 #338
Al-Nawawī commented on this tradition, writing, “Likewise, it is forbidden
for a man to look at a beardless youth if he has a handsome appearance, whether he looks with passion or not, whether he is safe from temptation or he fears it. This is the correct and preferred opinion of credible scholars, as transmitted from Al-Shāfi’ī.”
Al-Nawawī and Muslim, Sharḥ al-Nawawī ‘alá Ṣaḥīḥ Muslim, (Bayrūt: Dār Iḥyā’ al-Turāth al-’Arabī,
1972), 4:31.