Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
8.3
CVE-2026-71887: Bouncy Castle Java accepts signatures from unverified subkeys
CVE-2026-71887 · published 1 month ago
Summary
The Java Bouncy Castle library (versions before 1.86) can treat a subkey’s signature as valid even when the subkey is not properly linked to its main key. This means an attacker could use a public signing subkey to forge signatures that appear to come from a trusted certificate. Upgrade Bouncy Castle to version 1.86 or later, or apply patches that enforce the required cross‑certification check.
What to do
- Update debian bouncycastle to version 1.86-1.
- Update legion of the bouncy castle inc. bc-java to version 1.86 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| – | legion of the bouncy castle inc. | bc-java | < 1.86 |
| Debian:12 | debian | bouncycastle | All versions |
| Debian:14 | debian | bouncycastle |
< 1.86-1 Fix: upgrade to 1.86-1
|
| Ubuntu:Pro:16.04:LTS | canonical | bouncycastle | All versions |
Original advisory text
OpenPGP data signature accepted from a signing subkey without cross-certification
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.
References
- https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%9071887 Vendor Advisory
- https://security-tracker.debian.org/tracker/CVE-2026-71887 Vendor Advisory
- https://www.bouncycastle.org/download/bouncy-castle-java/ URL
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71887... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-71887 Vendor Advisory
- https://github.com/bcgit/bc-java Product
- https://ubuntu.com/security/CVE-2026-71887 Third Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-71887 Third Party Advisory
- https://github.com/bcgit/bc-java/commit/b51452fa48ccb578fc16b8222fce9eedf92c94d6 Patch
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Severity
8.3
High
Type
CWE-347Improper Verification of Cryptographic Signature
CWE-345Insufficient Verification of Data Authenticity
Timeline
Published3 Oct 2026
Updated21 Oct 2026
First seen3 Oct 2026
Sources
CVE-2026-71887 · NVD
CVE-2026-71887 · MITRE
DEBIAN-CVE-2026-71887 · OSV
CVE-2026-71887 · OSV
UBUNTU-CVE-2026-71887 · OSV
Track software like this
Free during beta