Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates this as a marfu' hadith: The Prophet (peace and blessings be upon him) said: "Whoever comes to food to which he was not invited enters as a thief and eats what is unlawful (haram)." (Allamah al-Haythami says:) I say:
Abu Dawud recorded this report; however, he did not record these words: "and eats what is unlawful."
Al-Bazzar recorded it; its chain contains a narrator, Aban bin Tariq, and he is da'if (weak).