All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
This Hadeeth was reported by Al-Bukhari in a Mu’allaq form (a Mu’allaq Hadeeth is a Hadeeth whose reporter omits the whole chain of narrators and quotes the Prophet, sallallaahu ‘alayhi wa sallam, directly), but it was reported as Mawsool (with a complete chain of narrators) in the book entitled At-Taareekh As-Sagheer authored by Al-Bukhari and in other books.
This Hadeeth is really what some people used as evidence for the legitimacy of building shrines over graves, but actually it cannot be an evidence to prove that, praise be to Allaah.
Shaykh Abdur-Rahmaan Al-Mu’allimi refuted using this Hadeeth as evidence for that in his book entitled ‘Building over the graves’. To refute that, he provided 11 reasons among which he mentioned the following:
The Hadeeth is Dha’eef (weak), as it was narrated by Ibn Is-haaq, who – despite the fact that he is Sadooq (a truthful narrator) – is considered as weak in case of any Hadeeth in which he was the only one to narrate, as stated by Ath-Thahabi, and here he was the only one who narrated this Hadeeth.
He (Al-Mu’allimi) also mentioned: Even if we presume that the Hadeeth is Saheeh (sound), it did not mention whether they jumped over it (the grave) lengthwise or crosswise, rather both of which are probable, and it might be that what is meant is the wide area of the grave and not its height. So, when a possibility occurs in a text, such a text will lose its power to act as supporting evidence.
Allaah Knows best.