It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them) that he said: None of you should say about something he does not know, "Allah knows it." Allah knows more than that, but then that person includes in Allah's knowledge something the reality of which he himself does not know. This is a very great sin in the sight of Allah.
Hadith Referenceالادب المفرد / كتاب الأقوال / 764
Hadith Gradingالألبانی:صحيح
Hadith Takhrij«صحيح : أخرجه عبدالرزاق : 15964»
Explanation & Benefits
Shaykh Maulana Usman Muneeb
Benefits and Issues: The point is that if a person does not have knowledge of something, he should say that he does not know about it. If he does have knowledge, then he should not withhold it out of miserliness; rather, he should inform about the actual situation. If a person does not know something and says, “Allah knows that it is such-and-such,” while in reality it is not so, then he has attributed to Allah something He did not say, and this is a major sin (kabirah). The statement of the noble Companions (radi Allahu anhum), “Allah knows best,” was not based on any sense of shame that they did not know, nor did the later generations consider the negation of knowledge about themselves to be blameworthy. Therefore, they would say this not to mislead the questioner.
Source: Fadlullah al-Ahad: Urdu Commentary on al-Adab al-Mufrad, Page: 764