There is a remedy for every malady, and when the remedy is applied to the disease it is cured with the permission of Allah, the Exalted and Glorious. (Using translation from Muslim 2204)
عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ قَالَ «لِكُلِّ دَاءٍ دَوَاءٌ فَإِنْ أَصَابَ الدَّاءَ الدَّوَاءُ بَرِئَ بِإِذْنِ اللَّهِ ﷻ»