CVE-2026-71887: OpenPGP data signature accepted from a signing subkey without cross-certification

Published Oct 3, 2026
·
Updated

In Bouncy Castle for Java before 1.86, the high-level OpenPGP API accepted a data signature made by a signing subkey whose Subkey Binding signature carried no embedded Primary Key Binding (cross-certification) signature, in the case where that binding omits a Key Flags subpacket. RFC 9580 sec. 5.2.1.8 and sec. 10.1.3 require the embedded Primary Key Binding signature on any subkey that can issue signatures; it is the subkey's own statement that it belongs to the primary key it is bound under. OpenPGPCertificate resolved the subkey's key flags two different ways. isSigningKey() goes through getKeyFlags() and getApplyingSubpacket(), which falls back to the primary key's direct-key or primary User ID self-signature when the binding signature omits the subpacket, so the subkey inherited the primary's SIGNDATA and counted as signing-capable; verifyEmbeddedPrimaryKeyBinding(), which enforces the requirement, reads the binding signature's own hashed subpackets, found no SIGNDATA there, and returned early as a non-signing key without ever demanding the back signature. The same subkey was therefore signing-capable - so its signatures were attributed to the certificate and OpenPGPSignature.OpenPGPDocumentSignature.isValid() returned true - while being exempt from cross-certification, where GnuPG refuses the identical certificate and message. An attacker needs only the victim's public signing subkey, which is public material: they bind it to their own primary key with a Subkey Binding signature they are able to make, carrying no Key Flags and no embedded Primary Key Binding signature, which they cannot make without the subkey's private key, and a relying party verifying one of the victim's genuinely signed messages against that certificate is told the signature is valid and given the attacker's certificate as its issuer. Because a certificate's User IDs are self-asserted, a verifier that pins on the subkey's fingerprint or key ID while taking the identity from the enclosing certificate reports a real signature under an attacker-chosen identity. This is misattribution of a genuine signature rather than forgery of a new one: no private key is recovered, and the signature must be one the grafted subkey actually made. The low-level PGPSignature / PGPPublicKeyRing API performs no binding checks by design and is unaffected. Key Flags are a statement about the key the carrying signature refers to (RFC 9580 sec. 5.2.3.29), so a subkey no longer inherits them from the certificate-wide signatures of the primary key: a Subkey Binding signature that omits the subpacket now leaves the subkey with no capabilities rather than the primary's, which makes the flags the cross-certification check consults the same flags every other decision consults. Preferences and the other subpackets a direct-key signature carries are inherited as before, and the primary key itself, whose flags legitimately come from its own direct-key or User ID self-signature, is unaffected.

Affected Software

1 affected component
Bouncy Castle Bouncy Castle for Java<1.86

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Bouncy Castle for Java to a version that resolves this vulnerability.

    Fixed in 1.86

Event History

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

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using Bouncy Castle for Java versions before 1.86 are affected when they use the high-level OpenPGP API to evaluate data signatures. The vulnerable case involves a signing subkey whose Subkey Binding signature omits both Key Flags and the embedded Primary Key Binding cross-certification.

2

What does an attacker need to exploit this behavior?

An attacker needs to present a data signature made by a subkey that is treated as signing-capable through inherited primary-key SIGN_DATA flags, while its own binding signature lacks the required embedded Primary Key Binding signature. The API can then attribute that signature to the certificate despite the missing cross-certification.

3

How can I determine whether a certificate triggers the vulnerable condition?

Inspect each signing subkey's Subkey Binding signature. The affected condition exists when the binding has no Key Flags subpacket and no embedded Primary Key Binding signature, while the primary key's applicable direct-key or primary User ID self-signature supplies SIGN_DATA.

4

What is the remediation?

Upgrade Bouncy Castle for Java to version 1.86 or later. If upgrading cannot happen immediately, do not accept data signatures from subkeys matching the affected binding-signature condition.

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