Abdullah bin Abbas reported,

The Messenger of Allah ﷺ passed by a woman who was in her covered litter. She was told, "This is the Messenger of Allah ﷺ." She took hold of the upper arms of a small boy who was with her and asked, "Does this child have a valid Hajj, Messenger of Allah?"He replied, "Yes, and you will have a reward."

Azami 4774

Sahih

عن ابن عباس

أن رسول الله ﷺ مر بامرأة وهي في محفتها فقيل لها هذا رسول الله ﷺ فأخذت بضبعي صبي كان معها فقالت: ألهذا حج يا رسول الله؟ قال: نعم ولك أجر.

الأعظمي 4774صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Obligation of Hajj, its virtue, and its conditions
Section
Hajj of a child and who receives the reward for performing it with him
Numbering
Jami al-Kamil 4774 (2nd edition)
Azami 4774