The CCC says the following:
**1257 **The Lord himself affirms that Baptism is necessary for salvation. He also commands his disciples to proclaim the Gospel to all nations and to baptize them. Baptism is necessary for salvation for those to whom the Gospel has been proclaimed and who have had the possibility of asking for this sacrament. The Church does not know of any means other than Baptism that assures entry into eternal beatitude; this is why she takes care not to neglect the mission she has received from the Lord to see that all who can be baptized are “reborn of water and the Spirit.” God has bound salvation to the sacrament of Baptism, but he himself is not bound by his sacraments.
**1258 **The Church has always held the firm conviction that those who suffer death for the sake of the faith without having received Baptism are baptized by their death for and with Christ. This Baptism of blood, like the desire for Baptism, brings about the fruits of Baptism without being a sacrament.
**1259 **For *catechumens *who die before their Baptism, their explicit desire to receive it, together with repentance for their sins, and charity, assures them the salvation that they were not able to receive through the sacrament.