1John 2:20,21 But you have an anointing from the Holy One, and you know all things. I have not written to you because you do not know the truth, but because you know it, and that no lie is of the truth.
Everyone born of God has been anointed with the Holy Spirit. In fact "if anyone does not have the Spirit of Christ, he does not belong to Christ." Rom 8:9 That's why John can make such a general statement. John elaborates upon this in verse 27. One work of the Holy Spirit is guidance into the truth. Jesus said, "When he, the Spirit of truth, comes, he will guide you into all truth." John 16:13