CVE-2026-71887: CWE-347 Improper Verification of Cryptographic Signature in Legion of the Bouncy Castle Inc. BC-JAVA
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 SIGN_DATA and counted as signing-capable; verifyEmbeddedPrimaryKeyBinding(), which enforces the requirement, reads the binding signature's own hashed subpackets, found no SIGN_DATA 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.
AI Analysis
Technical Summary
The vulnerability arises because the high-level OpenPGP API in Bouncy Castle for Java before version 1.86 accepts data signatures made by signing subkeys whose Subkey Binding signatures omit the embedded Primary Key Binding signature mandated by RFC 9580. The API's isSigningKey() method incorrectly inherits signing capability from the primary key when the binding signature omits the Key Flags subpacket, while verifyEmbeddedPrimaryKeyBinding() correctly identifies the subkey as non-signing but does not enforce this consistently. An attacker can bind a victim's public signing subkey to their own primary key with a crafted Subkey Binding signature lacking Key Flags and the embedded Primary Key Binding signature. This causes verifiers relying on the vulnerable API to accept genuine signatures as valid under an attacker-chosen identity, resulting in signature misattribution rather than forgery. The low-level PGPSignature / PGPPublicKeyRing API is unaffected. The issue is fixed by ensuring subkeys without the required embedded Primary Key Binding signature do not inherit signing capabilities.
Potential Impact
An attacker can cause a genuine signature made by a victim's signing subkey to be misattributed to an attacker-controlled certificate. This can lead to incorrect validation of signatures under false identities without requiring access to private keys. The vulnerability affects signature verification trustworthiness in applications using the vulnerable Bouncy Castle OpenPGP API versions 1.81 to before 1.86.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid relying on the vulnerable high-level OpenPGP API for signature verification or implement additional checks to enforce the presence of embedded Primary Key Binding signatures on signing subkeys as required by RFC 9580.
CVE-2026-71887: CWE-347 Improper Verification of Cryptographic Signature in Legion of the Bouncy Castle Inc. BC-JAVA
Description
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 SIGN_DATA and counted as signing-capable; verifyEmbeddedPrimaryKeyBinding(), which enforces the requirement, reads the binding signature's own hashed subpackets, found no SIGN_DATA 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.
CVSS v4.0
Score 8.2high
Affected software
Legion of the Bouncy Castle Inc.
BC-JAVA
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because the high-level OpenPGP API in Bouncy Castle for Java before version 1.86 accepts data signatures made by signing subkeys whose Subkey Binding signatures omit the embedded Primary Key Binding signature mandated by RFC 9580. The API's isSigningKey() method incorrectly inherits signing capability from the primary key when the binding signature omits the Key Flags subpacket, while verifyEmbeddedPrimaryKeyBinding() correctly identifies the subkey as non-signing but does not enforce this consistently. An attacker can bind a victim's public signing subkey to their own primary key with a crafted Subkey Binding signature lacking Key Flags and the embedded Primary Key Binding signature. This causes verifiers relying on the vulnerable API to accept genuine signatures as valid under an attacker-chosen identity, resulting in signature misattribution rather than forgery. The low-level PGPSignature / PGPPublicKeyRing API is unaffected. The issue is fixed by ensuring subkeys without the required embedded Primary Key Binding signature do not inherit signing capabilities.
Potential Impact
An attacker can cause a genuine signature made by a victim's signing subkey to be misattributed to an attacker-controlled certificate. This can lead to incorrect validation of signatures under false identities without requiring access to private keys. The vulnerability affects signature verification trustworthiness in applications using the vulnerable Bouncy Castle OpenPGP API versions 1.81 to before 1.86.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid relying on the vulnerable high-level OpenPGP API for signature verification or implement additional checks to enforce the presence of embedded Primary Key Binding signatures on signing subkeys as required by RFC 9580.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-08-08T00:06:06.982Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac0c0f9a43b0b3b89b059b9
Added to database: 10/03/2026, 08:46:49 UTC
Last enriched: 10/03/2026, 09:01:12 UTC
Last updated: 10/03/2026, 21:45:56 UTC
Views: 16
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.