He heard the Messenger of Allah ﷺ say, "None of you should urinate in still water that does not flow, and then bathe in it."
أنه سمع رسول الله ﷺ يقول: لا يبولن أحدكم في الماء الدائم الذي لا يجري، ثم يغتسل فيه.
Bukhari related it in the Book of Wudu (239) and Muslim in the Book of Purification (282), both through separate chains, from Abu Hurairah. In one version reported by Muslim, "Do not urinate in still water that does not flow, then wash from it." Abu Dawud added (70), "and do not wash from janaba in it." His statement "still water" means stagnant water, as in the version reported by Nasai (49/1).