The Messenger of Allah ﷺ said, "The Children of Israil used to bathe naked, looking at one another's private parts, while Musa would bathe alone. They said, 'By Allah, nothing prevents Musa from bathing with us except that he has a hernia in his scrotum.'One day, Musa went to bathe and placed his garment on a rock, but the rock ran off with his garment. Musa rushed after it, calling out, 'My garment, rock! My garment, rock!' until the Children of Israil saw Musa's private parts and said, 'By Allah, there is nothing wrong with Musa.' The rock then stopped, and Musa was seen by them. He took his garment and began striking the rock."Abu Hurairah said, "By Allah, there are six or seven marks on the rock from Musa's striking it."
قال رسول الله ﷺ: كانت بنو إسرائيل يغتسلون عراة ينظر بعضهم إلى سوأة بعض، وكان موسى عليه السلام يغتسل وحده فقالوا: والله ما يمنع موسى أن يغتسل معنا إلا أنه آدر قال: فذهب مرة يغتسل فوضع ثوبه على حجر ففر الحجر بثوبه قال: فجمح موسى بإثره يقول: ثوبي حجر، ثوبي حجر حتى نظرت بنو إسرائيل إلى سوأة موسى قالوا: والله ما بموسى من بأس، فقام الحجر حتى نظر إليه، قال: فأخذ ثوبه، فطفق بالحجر ضربا. قال أبو هريرة: والله إنه بالحجر ندب ستة أو سبعة ضرب موسى بالحجر.
Bukhari related it in the Book of Wudu (278), and Muslim in the Book of Virtues (339:155), both from the narration of Abdul-Razzaq, who said, Mamar narrated to us from Hammam bin Munabbih, who said, this is what Abu Hurairah narrated to us from Muhammad, the Messenger of Allah ﷺ, and he then related it.