The Catholic Church has issued a warning to its clergy in Washington state: Any priest who complies with a new law requiring the reporting of child abuse confessions to authorities will be excommunicated.
https://www.newsweek.com/catholic-church-excommunicate-priests-following-new-us-state-law-2069039
That privilege does not extend to ongoing crimes or future crimes. Lawyers have an obligation to act to prevent harm to both their client and others. If you were to tell your lawyer you kidnapped someone and locked them in your basement, they’re absolutely going to tell the police about it so that person can be rescued. Past crimes may or may not be confidential depending on the nature of them. For instance if you admit to molesting a kid in the past that’s currently living with you the lawyer would likely report that because it’s highly likely you would molest that child again in the future. It’s all contextual, but there is no absolute right to confidentiality.