Praise be to Allah.
The words of Abu Hurayrah (may Allah be pleased with him) referred to in the question are: “I memorised from the Messenger of Allah (blessings and peace of Allah be upon him) two vessels (of knowledge). As for one of them, I have disclosed it, but as for the other, if I were to disclose it, this throat would be cut.”
Narrated by al-Bukhaari (120).
It was narrated that Yazeed ibn al-Asamm said:
It was said to Abu Hurayrah: You have narrated a great deal, you have narrated a great deal. He said: If I told you everything that I heard from the Prophet (blessings and peace of Allah be upon him), you would pelt me with stones and clods of earth, and you would not sit with me.
Narrated by Ahmad in al-Musnad (16/563). The commentators said: Its isnaad is saheeh.
With regard to what some of the extreme Sufis say, that what Abu Hurayrah concealed of knowledge was esoteric (baatini) knowledge that included wahdat al-wujood (pantheism), this is false for several reasons:
These people have no evidence to prove their claim to be true. Abu Hurayrah himself did not explain what was in this vessel that he concealed of hadiths, so how could these people know what he really concealed?
Belief in wahdat al-wujood (pantheism) constitutes blatant kufr (disbelief), according to the consensus of the Muslim scholars. Attributing this view to the noble Sahaabi Abu Hurayrah (may Allah be pleased with him) is one of the worst and most offensive kinds of lie.
moreover, if belief in wahdat al-wujood or baatini knowledge was something that is sound according to Islamic teaching, then how could the Prophet (blessings and peace of Allah be upon him) conceal it and instruct his companions to conceal it? Why would he conceal the truth that has to do with essential matters of belief, when Allah, may He be glorified and exalted, says (interpretation of the meaning): “Verily, those who conceal the clear proofs, evidences and the guidance, which We have sent down, after We have made it clear for the people in the Book, they are the ones cursed by Allah and cursed by the cursers” [al-Baqarah 2:159]?
Muslim scholars are unanimously agreed that whatever Abu Hurayrah concealed had nothing to do with wahdat al-wujood or baatini knowledge; rather it was some hadiths about tribulations (fitan) and the portents of the Hour that were applicable to some of the rulers at the time of Abu Hurayrah, and he feared that they would persecute him and wrong him, and he thought that concealing these hadiths would not be detrimental to Islamic teachings and knowledge in any way, because the wrongdoing of the transgressors was quite evident and well-known, and there was no need for a marfoo‘ hadith (a hadith that was attributed directly to the Prophet (blessings and peace of Allah be upon him)) to explain it.
Imam al-Qurtubi (may Allah have mercy on him) said:
Our scholars said: What Abu Hurayrah did not disclose, and feared that he may be persecuted or killed because of it, has to do with matters of tribulations and statements identifying individual apostates and hypocrites, and similar matters that did not have to do with Islamic teachings and guidance. And Allah knows best. End quote.
Al-Jaami‘ li Ahkaam al-Qur’an (2/186)
Imam adh-Dhahabi (may Allah have mercy on him) said:
It was narrated that Makhool said: Abu Hurayrah used to say: There may be a bag of knowledge that Abu Hurayrah has and has not opened it.
I – namely Imam adh-Dhahabi – say: This indicates that it is permissible to conceal some hadiths that may provoke fitnah (trouble or confusion) concerning fundamental matters or minor issues, or praise and criticism. As for hadiths that have to do with halaal and haraam, it is not permissible to conceal them under any circumstances, because they come under the heading of Islamic teachings and guidance. In Saheeh al-Bukhaari it tells us that ‘Ali (may Allah be pleased with him) said: Tell the people what they know, and leave that which they will find objectionable; do you want Allah and His Messenger to be disbelieved? Similarly, if Abu Hurayrah had disclosed that vessel of knowledge, he would have been persecuted; rather he may have been executed. But a scholar’s ijtihaad may lead him to propagate a particular hadith in order to revive the Sunnah, and he will have the reward for what he intended, and he will have a reward even if he made a mistake in his ijtihaad. End quote.
Siyar A‘laam an-Nubala’ (2/597).
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
The scholars interpreted the vessel that he did not disclose as referring to hadiths which stated the names of bad rulers and governors, and described their situation and their times. Abu Hurayrah used to give hints about some of them but he did not state anything openly, for fear of being harmed at their hands, such as when he said: I seek refuge with Allah the beginning of the sixties (i.e. the sixtieth year A.H.), and the rulership of boys (young men), referring to the caliphate of Yazeed ibn Mu‘aawiyah, because it began in 60 AH. Allah answered the supplication of Abu Hurayrah and he died a year before that.
Ibn al-Muneer said: The baatinis take this hadith as a means of showing their falsehood to be true, because they believe that sharee‘ah has a manifest form and an esoteric form, but this esoteric form will only lead to deviation from the faith.
He said: Rather what Abu Hurayrah meant when he said “cut” was that the unjust rulers would cut off his head if they heard him criticising their actions and regarding their efforts as misguided. This is supported by the fact that if the concealed hadiths had to do with shar‘i rulings, he would not have concealed them.
Another scholar said: It may be that he was referring to hadiths that have to do with the portents of the Hour and the changes and major battles at the end of time, and those who were not used to such reports would object to that and would not accept it. End quote.
Fath al-Baari (1/216)
Al-‘Allaamah Muhammad Rasheed Rida (may Allah have mercy on him) said:
As for the Sufis, some of them were deceived by these specious arguments and misinterpretations, because they were lacking in knowledge of the Qur’an and Sunnah, so they adhered to da‘eef (weak) hadiths and followed the apparent meaning of some saheeh (sound) hadiths and reports, such as the words of Abu Hurayrah that were narrated in Saheeh al-Bukhaari: “I memorised from the Messenger of Allah (blessings and peace of Allah be upon him) two vessels (of knowledge). As for one of them, I have disclosed it, but as for the other, if I were to disclose it, this throat would be cut,” and he pointed to his throat.
The ignorant Sufis claimed that what they have of “ ‘ilm al-haqeeqah (knowledge of reality)” is what was in the second of the two vessels of Abu Hurayrah. Some of them think that their shaykhs have a chain of narration through which they receive esoteric knowledge (‘ilm al-baatin) that goes back to some of the Sahaabahs or prominent figures among Ahl al-Bayt (may Allah be pleased with them all).
But the view of the scholars is that what Abu Hurayrah meant by the hadiths that he concealed was the hadiths of al-fitan (tribulation) and what would occur of corruption in people’s religious commitment and worldly affairs, caused by some young men among the fools of Quraysh, who were Banu Umayyah.
It was narrated from him that he prayed to Allah, may He be exalted, to save him from the year 60 and the rulership of boys (young men), and he died in 57 or 59 AH. In 60 AH Yazeed ibn Mu‘aawiyah became the ruler. Thus it was known that Abu Hurayrah was seeking refuge with Allah from his rule, and Allah, may He be exalted, protected him from it, so he did not live to see those dark days.
It was narrated from him that he used to say – concerning some young men of Quraysh who caused corruption in the religious commitment of the Muslims, as it says in the hadith: If I wanted to tell you their names, I would do so. This indicates that he – like Hudhayfah ibn al-Yamaan – narrated hadiths about fitan (tribulations) and unjust rulers from the Prophet (blessings and peace of Allah be upon him), but he concealed them those those events came to pass, for fear of punishment from those tyrants and corrupt rulers. As for concealing any matters of religion, doing so is haraam according to consensus and according to the texts of the Qur’an and Sunnah, so how could he have concealed them? End quote.
Tafseer al-Mannaar (6/390)
Al-‘Allaamah Taahir al-Jazaa’iri (may Allah have mercy on him) said:
What he meant by the first vessel is the hadiths which he did not think would lead to any harm if he disclosed them, so he disclosed them. What he meant by the second vessel was the hadiths which had to do with unjust rulers and criticism of them. It was narrated from him that he said: If I wanted to tell you their names, I would do so. But he did not say that openly, for fear that they might harm him.
Some of the Sufis said: What he meant by it was hadiths having to do with the Divine secrets which no one can understand except people of high spiritual status.
But there is some doubt as to whether this is what is meant. If that was the case, then Abu Hurayrah could not have withheld them from all people; rather he would have disclosed them to some of the elite among the people. End quote.
Tawjeeh an-Nazr (1/63-64)
Please see also the answer to question no. 139569
And Allah knows best.