Mishkat al-Masabih 2480
Muslim b. Abu Bakra said:
My father used to say at the end of the prayer, “O God, I seek refuge in Thee from infidelity, poverty and the punishment in the grave.” I used to say these words also, so he asked me, “From whom did you get this, sonny?” When I told him that I had got it from him, he said that God’s messenger used to say these words at the end of the prayer. 

Nasa'i and Tirmidhi transmitted it, but the latter did not mention "at the end of the prayer." Ahmad transmitted the wording of the tradition, but he had, "at the end of every prayer."
وَعَن مُسلم بن أبي بَكرةَ قَالَ: كَانَ أَبِي يَقُولُ فِي دُبُرِ الصَّلَاةِ: اللَّهُمَّ إِن أَعُوذُ بِكَ مِنَ الْكُفْرِ وَالْفَقْرِ وَعَذَابِ الْقَبْرِ فَكُنْتُ أَقُولُهُنَّ فَقَالَ: أَيْ بُنَيَّ عَمَّنْ أَخَذْتَ هَذَا؟ قُلْتُ: عَنْكَ قَالَ: إِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يقولهُنَّ فِي دُبرِ الصَّلاةِ. رَوَاهُ النَّسَائِيّ وَالتِّرْمِذِيّ إِلَّا أَنَّهُ لَمْ يُذْكَرْ فِي دُبُرِ الصَّلَاةِ
وَرَوَى أَحْمَدُ لَفْظَ الْحَدِيثِ وَعِنْدَهُ: فِي دُبُرِ كل صَلَاة