Ibn 'Umar (May Allah be pleased with them) said:
The Messenger of Allah (ﷺ) prohibited riding a camel which eats dung, or animal or human waste.[Abu Dawud].
App reference: Book 18, Hadith 182
Arabic/English book reference: Book 18, Hadith 1692