Reference: Fataawa Noor ‘alad-Darb – Question No.6350, Pages 182-183, Volume 12
Question: What does the [following] saying of the Messenger (sal-Allaahu ‘alayhi wa sallam) mean:
Response: [Regarding] this supplication «اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ عِلْمٍ لاَ يَنْفَعُ» – «O Allaah! I seek refuge in you from knowledge that does not benefit»; [the word] ‘knowledge’ here is bound by ‘’does not benefit”. That is because knowledge is either beneficial or harmful; this is based upon the saying of the Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam):
So it is not possible for knowledge of the Sharee’ah to be outside of these two: either beneficial for the one who possesses it – so long as he acts upon it, teaches it and invites to it, or harmful for him if he does not uphold [at least] one of the three [activities – namely acting upon it, teaching it and inviting to it].
So when you say «O Allaah! I seek refuge in you from knowledge that does not benefit» – it is just like saying “O Allaah! I seek refuge in you from knowledge that harms”.