Usul al-Kafi
Book 4:
The Book of Divine Proof

Chapter 22
Imams are firmly rooted in knowledge

347. 1. Imam Muhammad al-Baqir (p) or Imam Jafar as-Sadiq (p) explained the verse: ...And none knows its true hidden interpretation except God and those firmly rooted in knowledge… (Q, 3:7)
The Imam (p): Prophet Muhammad (p) is the most excellent of those firmly rooted in knowledge. God, to whom belong Might and Majesty, has taught him the meaning and the interpretation of the revelation that He sent. And God did not send him anything whose hidden interpretation He has not taught him. And his successors know all of it (i.e. interpretation). When a man of knowledge reveals the interpretation, those who do not know readily acknowledge it as God’s words: …They say, we believe in it, all is from our Lord… (Q, 3:7). The verses of the Noble Quran are specific and general, established and unambiguous, abrogating and abrogated; because of this (only) those who are firmly rooted in knowledge know it.

348. 3. Commenting on the divine verse of the Noble Quran: …No one knows the hidden meaning of allegorical verses of the Quran except God and those who are firmly grounded in knowledge (Q, 3:7).
Imam Jafar as-Sadiq (p): Those who are firmly grounded in knowledge are Imam Ali (p) and the Imams (p) succeeding him.