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 night, and his entertainment as a guest is for three days. Whatever is beyond that is charity. It is not permissible for the guest to stay so long that he causes his host hardship."
أن رسول الله ﷺ قال: من كان يؤمن بالله واليوم الآخر، فليقل خيرا أو ليصمت، ومن كان يؤمن بالله واليوم الآخر، فليكرم جاره، ومن كان يؤمن بالله واليوم الآخر، فليكرم ضيفه، جائزته يوم وليلة، وضيافته ثلاثة أيام، فما كان بعد ذلك، فهو صدقة، ولا يحل له أن يثوي عنده حتى يحرجه.
Malik narrated it in the description of the Prophet ﷺ (22), from Saeed bin Abu Saeed Maqburi, from Abu Shurayh Kaabi, and he mentioned it. Bukhari also narrated it in the chapter on manners (6135) through the route of Malik, with the same wording.Bukhari narrated it in the chapter on manners (6019), and Muslim narrated it in the chapter on found property (14:48) following hadith (1726), both of them through the route of Layth, from Saeed Maqburi, with a longer wording than this, and it is mentioned among the collected rights of the neighbor.