The Messenger of Allah (ﷺ) prohibited unclean medicine.

Sunan Abi Dawud Book 29, Hadith 16