Those who die for the faith, those who are catechumens, and all those who, without knowing of the Church but acting under the inspiration of grace, seek God sincerely and strive to fulfill his will, are saved even if they have not been baptized (cf. LG 16).
Source: Catechism of the Catholic Church (Vatican.va)