Sayyidah Aishah Siddiqah (may Allah be pleased with her) narrates that the Prophet (peace and blessings be upon him) said: "Whoever enters upon a people's food without having been invited enters as a sinner (fasiq) and eats what is unlawful (haram)."
Al-Bazzar recorded it; its chain contains a narrator, Yahya bin Khalid, and he is majhul (unknown). Al-Tabarani also recorded it in al-Mu'jam al-Awsat through the same route; however, in it he recorded these words: "Whoever comes to a people's food to which he was not invited and then eats something has eaten what is unlawful."