The Prophet ﷺ said: If anyone finds an animal whose owners were helpless to provide fodder to it and so they turned it out (of their house), and he took it and looked after it, it will belong to him. Abu Dawud said: This is the tradition of Hammad. It is more plain and perfect.
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ مَنْ وَجَدَ دَابَّةً قَدْ عَجَزَ عَنْهَا أَهْلُهَا أَنْ يَعْلِفُوهَا فَسَيَّبُوهَا فَأَخَذَهَا فَأَحْيَاهَا فَهِيَ لَهُ قَالَ فِي حَدِيثِ أَبَانَ قَالَ عُبَيْدُ اللَّهِ فَقُلْتُ عَمَّنْ قَالَ عَنْ غَيْرِ وَاحِدٍ مِنْ أَصْحَابِ النَّبِيِّ ﷺ