This is an example of how the Catholic Church can contradicted itself and the Bible at the same time.
1- Catholic Catechism, par. 846 How are we to understand this affirmation, often repeated by the Church Fathers? [Cf. Cyprian, Ep. 73.21: PL 3, 1169; De unit.: PL 4, 509-536.] Re-formulated positively, it means that all salvation comes from Christ the Head through the Church which is his Body: Basing itself on Scripture and Tradition, the Council teaches that the Church, a pilgrim now on earth, is necessary for salvation: the one Christ is the mediator and the way of salvation; he is present to us in his body which is the Church. He himself explicitly asserted the necessity of faith and Baptism, and thereby affirmed at the same time the necessity of the Church which men enter through Baptism as through a door. Hence they could not be saved who, knowing that the Catholic Church was founded as necessary by God through Christ, would refuse either to enter it or to remain in it**.** [LG 14; cf. Mark 16:16; John 3:5.]
**2- **Catholic Catechism, par. 841[size=3] The Church’s relationship with the Muslims. 'The plan of salvation also includes those who acknowledge the Creator, in the first place amongst whom are the Muslims; these profess to hold the faith of Abraham, and together with us they adore the one, merciful God, mankind’s judge on the last day.’ [LG 16; cf. NA 3.]
3- John 3:18 Whoever believes in him [Jesus] is not condemned, but whoever does not believe stands condemned already because he has not believed in the name of God’s one and only Son.
John 14:6 Jesus answered, “I am the way and the truth and the life. No one comes to the Father except through me.”
Acts 4:11-12  He is “the stone you builders rejected, which has become the capstone [cornerstone of a building].”  Salvation is found in no one else, for there is no other name under heaven given to men by which we must be saved.
John 5:22-23  Moreover, the Father judges no one, but has entrusted all judgment to the Son,  that all may honor the Son just as they honor the Father. He who does not honor the Son does not honor the Father, who sent him.