CVE-2026-59642: CMS AuthenticatedData content not bound to MAC when authAttrs present
(updated )
Affects Bouncy Castle for Java before 1.85. RecipientInformation.getContentStream() digests the content separately while the MAC covers only the DER-encoded authenticated attributes, and the library never compares the computed digest against the messageDigest attribute that RFC 5652 requires. The documented usage pattern compares only the two MAC values, so callers following it never bind content to the MAC. An attacker can replace the encapsulated content while leaving the attributes and MAC intact, and verification still succeeds.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-59642 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →