The Messenger of Allah ﷺ said, "Whoever takes an oath and says in his oath, 'By al-Lat and al-Uzza,' let him say, 'There is no god but Allah.'"
حدثنا عبد الرحمن بن إبراهيم الدمشقي حدثنا عمر بن عبد الواحد عن الأوزاعي عن الزهري عن حميد
أن رسول الله ﷺ قال من حلف فقال في يمينه باللات والعزى فليقل لا إله إلا الله
Bukhari reported it in the Book of Manners, chapter "Whoever did not consider one who says such a thing while erring in interpretation or out of ignorance to be a disbeliever," hadith no. 6107, and Muslim reported it in the Book of Oaths, the preceding chapter, hadith no. 1647(b), from the hadith of Uzai through this route. The hadith has other routes as well, from Zuhri through this route.