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)۔