Abu Dharr reported,

The Messenger of Allah ﷺ said, "When one of you is standing in prayer, what serves as a barrier in front of him is something the height of the back of a saddle. If there is nothing the height of the back of a saddle in front of him, then his prayer is broken by a woman, a donkey, or a black dog passing in front of him."I asked, "What distinguishes the black dog from the yellow or the red?"He replied, "I asked the Messenger of Allah ﷺ just as you have asked me, and he said, 'The black dog is a devil.'"

Nasai 751

Sahih

أخبرنا عمرو بن علي قال أنبأنا يزيد قال حدثنا يونس عن حميد بن هلال عن عبد الله بن الصامت

عن أبي ذر قال

قال رسول الله ﷺ إذا كان أحدكم قائما يصلي فإنه يستره إذا كان بين يديه مثل آخرة الرحل فإن لم يكن بين يديه مثل آخرة الرحل فإنه يقطع صلاته المرأة والحمار والكلب الأسود قلت ما بال الأسود من الأصفر من الأحمر فقال سألت رسول الله ﷺ كما سألتني فقال الكلب الأسود شيطان

النسائي 751صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Qibla
Chapter
What invalidates the prayer and what does not invalidate it when there is no sutrah in front of the one praying
Numbering
Darussalam 751
Nasai 751