Catechism of the Catholic Church
2488 The right to the communication of the truth is not unconditional. Everyone must conform his life to the Gospel precept of fraternal love. This requires us in concrete situations to judge whether or not it is appropriate to reveal the truth to someone who asks for it.
2489 Charity and respect for the truth should dictate the response to every request for information or communication. The good and safety of others, respect for privacy, and the common good are sufficient reasons for being silent about what ought not be known or for making use of a discreet language. The duty to avoid scandal often commands strict discretion. No one is bound to reveal the truth to someone who does not have the right to know it. 283
2490 The secret of the sacrament of reconciliation is sacred, and cannot be violated under any pretext. "The sacramental seal is inviolable; therefore, it is a crime for a confessor in any way to betray a penitent by word or in any other manner or for any reason." 284
2491 Professional secrets - for example, those of political office holders, soldiers, physicians, and lawyers - or confidential information given under the seal of secrecy must be kept, save in exceptional cases where keeping the secret is bound to cause very grave harm to the one who confided it, to the one who received it or to a third party, and where the very grave harm can be avoided only by divulging the truth. Even if not confided under the seal of secrecy, private information prejudicial to another is not to be divulged without a grave and proportionate reason.
2492 Everyone should observe an appropriate reserve concerning persons' private lives. Those in charge of communications should maintain a fair balance between the requirements of the common good and respect for individual rights. Interference by the media in the private lives of persons engaged in political or public activity is to be condemned to the extent that it infringes upon their privacy and freedom.
Notes:
English Translation of the Cathechism of the Catholic Church for the United States of America © 1997, United States Catholic Conference, Inc.