Catechism of the Catholic Church §2051 — excerpt
The infallibility of the Magisterium of the Pastors extends to all the elements of doctrine, including moral doctrine, without which the saving truths of the faith cannot be preserved, expounded, or observed.
This translation is under copyright, so only the cited words are quoted here. Follow the link for the full text. Translation: English translation of the Catechism of the Catholic Church, 2nd ed. (Libreria Editrice Vaticana), as posted at vatican.va.
