Sahih Muslim Book 22, Hadith Number 4877.

Chapter : It is forbidden to sacrifice the animal for anyone besides Allah, the Exalted, and curse upon one who does it.

Abu Tufail reported: We said to ‘Ali b. Abi Talib: Inform us about something which Allah’s Messenger (may peace be upon him) told you in secret, whereupon he said: He told me nothing in secret which he bid from people, but I heard him say: Allah cursed him who sacrificed for anyone besides Allah; and cursed him who accommodated an innovator; and Allah cursed him who cursed his parents and Allah cursed him who changed the boundary lines (of the land possessed by him).