The Messenger of Allah ﷺ said, "Whoever practices medicine without being known for any prior knowledge of it is liable for any harm caused."
حدثنا هشام بن عمار وراشد بن سعيد الرملي قالا حدثنا الوليد بن مسلم حدثنا ابن جريج
قال رسول الله ﷺ من تطبب ولم يعلم منه طب قبل ذلك فهو ضامن
[Its chain of transmission is daif] Abu Dawud narrated it in the Diyat, chapter on whoever practices medicine without knowledge of it and causes harm, hadith no. 4586, from the hadith of Walid, with this wording, and Hakim graded it sahih at 4/212, and Dhahabi agreed with him. Ibn Jurayj used the ambiguous form "an" in his transmission, and it has a daif corroborating narration, see Nayl al-Maqsud, hadith no. 4587