It is narrated from Imran bin Husain (may Allah be pleased with him) that the Messenger of Allah (ﷺ) said: "There is no (fulfillment of) vow in disobedience to Allah, nor is it necessary to fulfill a vow regarding that which the son of Adam does not possess."
Hadith Referenceمسند الإمام الشافعي / كتاب النذور / 1045
Hadith Takhrijاخرجه مسلم النذر ، باب لا وفاء لنذر في معصية الله ولا فيما لا يملك العبد (1641)۔
It is narrated from Imran bin Husain (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: "It is not permissible to fulfill a vow in disobedience to Allah, nor a vow regarding that which the son of Adam does not possess."
Hadith Referenceمسند الإمام الشافعي / كتاب النذور / 1046
Hadith Takhrijاخرجه مسلم النذر ، باب لا وفاء لنذر في معصية الله ولا فيما لا يملك العبد (1641)۔