Answer
Under no circumstances is a priest allowed to use "knowledge acquired in confession to the detriment of the penitent" (CIC 984). "The sacramental seal is inviolable; therefore it is absolutely forbidden for a confessor to betray in any way a penitent in words or in any manner and for any reason" (CIC 983).





