Mishkat al-Masabih 262
وَعَنِ ابْنِ عَبَّاسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم قَالَ: إِنَّ أُنَاسًا مِنْ أُمَّتِي سَيَتَفَقَّهُونَ فِي الدِّينِ ويقرءون الْقُرْآن يَقُولُونَ نَأْتِي الْأُمَرَاءَ فَنُصِيبُ مِنْ دُنْيَاهُمْ وَنَعْتَزِلُهُمْ بِدِينِنَا وَلَا يَكُونُ ذَلِكَ كَمَا لَا يُجْتَنَى مِنَ الْقَتَادِ إِلَّا الشَّوْكُ كَذَلِكَ لَا يُجْتَنَى مِنْ قُرْبِهِمْ إِلَّا - قَالَ مُحَمَّدُ بْنُ الصَّبَّاحِ: كَأَنَّهُ يَعْنِي - الْخَطَايَا . رَوَاهُ ابْن مَاجَه
From Ibn ʿAbbas, who said: The Messenger of Allah ﷺ said: "Some people of my Ummah will gain understanding of the religion and recite the Quran, and they will say: 'We will go to the rulers and get some of their worldly goods, and keep away from them with our religion.' But that will not be. Just as nothing is gathered from the tragacanth tree except thorns, likewise nothing is gathered from being near them except" — Muhammad ibn as-Sabbah said: as if he meant — "sins." Reported by Ibn Majah.