The Messenger of Allah ﷺ said, "Whoever believes in Allah and the Last Day should speak good or remain silent. Whoever believes in Allah and the Last Day should honor his neighbor. Whoever believes in Allah and the Last Day should honor his guest. His special hospitality is for one day and one night, and the full hospitality is three days. Anything beyond that is charity. It is not lawful for the guest to stay on with his host to the point of causing him hardship."
أن رسول الله ﷺ قال: من كان يؤمن بالله واليوم الآخر، فليقل خيرا أو ليصمت، ومن كان يؤمن بالله واليوم الآخر، فليكرم جاره، ومن كان يؤمن بالله واليوم الآخر، فليكرم ضيفه، جائزته يوم وليلة، و ضيافته ثلاثة أيام، فما كان بعد ذلك، فهو صدقة، ولا يحل له أن يثوي عنده حتى يحرجه.
Malik narrated it in the description of the Prophet ﷺ (22), from Saeed bin Abu Saeed Maqburi, from Abu Shurayh Kaabi, and he related it as mentioned.Bukhari narrated it in the book of manners (6135) through the route of Malik, with the same wording.Bukhari also narrated it in the book of manners (6019), and Muslim in the book of found property (14:48) following hadith (1726), both through the route of Layth, from Saeed Maqburi, with a longer version than this one.There are other hadiths with similar meaning mentioned in the chapters on the etiquette of hospitality.