CVE-2026-71888: CMS AuthenticatedData exposes attacker-inserted authAttrs when digestAlgorithm is absent

Published Oct 3, 2026
·
Updated

In Bouncy Castle for Java before 1.86, the streaming CMS AuthenticatedData parser accepted a message whose digestAlgorithm and authAttrs fields disagreed about whether authenticated attributes were present. RFC 5652 sec. 9.1 pairs the two, requiring that authAttrs be present whenever digestAlgorithm is, and sec. 9.2 makes the MAC cover the DER encoding of authAttrs when they are present and the eContent OCTET STRING directly when they are not. CMSAuthenticatedDataParser has to choose between those two in its constructor, before it can reach authAttrs, which comes later in the SEQUENCE, so it chose on digestAlgorithm alone: for a message with digestAlgorithm absent but authAttrs present it verified the content MAC and then returned the attributes through getAuthAttrs() as though they had been authenticated, when the MAC had never covered them. An attacker able to modify a message in transit could insert an authenticated attribute, such as an RFC 2634 ESSSecurityLabel, into an otherwise valid message while holding neither the key-encryption key nor the content-MAC key, and an application taking an authorization, routing or labelling decision from those attributes would act on attacker-chosen values. The content itself remained MAC-bound. asn1.cms.AuthenticatedData now rejects the mismatched pairing when parsing and CMSAuthenticatedDataParser cross-checks the two fields once authAttrs is read. This is a variant of CVE-2026-59642, which bound the content to the MAC for messages that legitimately carry authAttrs, and which does not address this case. This issue also affects Bouncy Castle for Java LTS before 2.73.13, and Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series), and bcutil-fips 2.0.8 (2.0.X series) and 2.1.8 (2.1.X series).

Affected Software

4 affected components
Bouncy Castle Bouncy Castle for Java<1.86
Bouncy Castle Bouncy Castle for Java LTS<2.73.13
Bouncy Castle bcpkix-fips<1.0.13, <2.0.13, <2.1.13
Bouncy Castle bcutil-fips<2.0.8, <2.1.8

Event History

Oct 3, 2026
CVE Published
via MITRE·08:36 AM
Data Sourced
via MITRE·08:36 AM
DescriptionWeakness

Frequently Asked Questions

1

What conditions must be present for this to be exploitable?

An attacker must be able to modify a CMS AuthenticatedData message in transit. The receiving application must use the streaming CMSAuthenticatedDataParser and make an authorization, routing, labelling, or similar decision based on values returned by getAuthAttrs().

2

Does the attacker need the content-MAC key or key-encryption key?

No. The described attack allows insertion of an authenticated attribute into an otherwise valid message without possessing either the key-encryption key or the content-MAC key.

3

Which messages are affected?

Affected messages have digestAlgorithm absent but include authAttrs. The parser verifies the MAC over the content and returns the inserted attributes as though they were authenticated, even though the MAC did not cover them.

4

How can exposure be reduced before updating?

Do not rely on attributes returned by getAuthAttrs() for security-sensitive decisions when processing CMS AuthenticatedData messages with the affected streaming parser. In particular, reject messages whose digestAlgorithm and authAttrs presence do not match.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203