Sahih Muslim Book 22, Hadith Number 4850.

Chapter : It was not permissible to eat the flesh of sacrificial animals beyond three days at the beginning of Islam, but this prohibition was abrogated, and now it is permissible.

Abu Ubaid reported: I was with ‘Ali b. Abi Talib on the occasion of the ‘Id day. He started with the ‘Id prayer before delivering the sermon, and said: Allah’s Messenger (may peace be upon him) forbade us to eat the flesh of our sacrificial animals beyond three days.