The Prophet of Allah ﷺ said, "If the son of Adam had a valley full of wealth, he would wish for another like it, and nothing will fill the soul of the son of Adam but dust. Yet Allah accepts the repentance of whoever repents."Ibn Abbas then remarked, "I do not know whether this is part of the Quran or not."
حدثنا روح حدثنا ابن جريج وعبد الله بن الحارث عن ابن جريج قال سمعت عطاء يقول
قال نبي الله ﷺ لو أن لابن آدم واديا مالا لأحب أن له إليه مثله ولا يملأ نفس ابن آدم إلا التراب والله يتوب على من تاب فقال ابن عباس فلا أدري أمن القرآن هو أم لا
Its chain of transmission is sahih. Bukhari related it in 216:11-218 with two chains through the route of Ibn Jurayj, and likewise Muslim related it in 1:286 through the route of Ibn Jurayj.As for Ibn Abbas's statement, "I do not know whether it is from the Quran or not," Bukhari related in the Sahih, 1:218, from Ubayy bin Kaab, who said, "We used to think this was from the Quran, until "Competition in increase distracts you" was revealed."Hafiz said, on 219, "The reason it was thought that the aforementioned hadith was from the Quran is what it contains of condemning greed for accumulating wealth, and the rebuke by means of death, which cuts that off, and which no one can escape. So when this surah was revealed, and it contained the same meaning along with additional content, they knew that the former was from the speech of the Prophet ﷺ." This is the correct explanation.