Skip to main content
Vulnerability Database/CVE-2026-71886

CVE-2026-71886: Bouncy Castle Java Auth Bypass Vulnerability

CVE-2026-71886 is an authentication bypass flaw in Bouncy Castle for Java that allows unauthorized third-party certifications through compromised subkeys. This post explains the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-71886 Overview

CVE-2026-71886 is an improper authorization vulnerability [CWE-285] in the Bouncy Castle for Java OpenPGP high-level certificate API. Versions 1.81 through 1.85.2 accept third-party certifications and trust delegations from any component key of an issuing certificate. The API does not verify that the signing component carries the RFC 9580 Section 5.2.3.29 CERTIFY_OTHER key flag. A compromised signing-only or encryption-only subkey can therefore issue a positive User ID certification or a full-trust direct-key delegation that the API attributes to the offline primary key. Applications relying on OpenPGPCertificate.getCertificationBy() or getDelegationBy() for identity or introducer-trust decisions can be deceived into trusting attacker-controlled identities.

Critical Impact

An already-compromised restricted subkey can be promoted to the primary key's identity-issuing authority, defeating the containment that OpenPGP key-flag separation is designed to enforce.

Affected Products

  • Bouncy Castle for Java 1.81
  • Bouncy Castle for Java 1.82 through 1.85.2
  • Applications using OpenPGPCertificate.getCertificationBy() or getDelegationBy() for trust decisions

Discovery Timeline

  • 2026-10-03 - CVE-2026-71886 published to the National Vulnerability Database
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-71886

Vulnerability Analysis

The flaw lives in the high-level OpenPGP certificate API shipped in pg/src/main/java/org/bouncycastle/openpgp/api/OpenPGPCertificate.java. The methods getCertificationBy() and getDelegationBy() resolve a third-party signature by matching the signature's issuer key identifier against every key in the third-party certificate. The implementation then verifies the issuing component's binding chain and the signature itself. The missing step is a check that the issuing component actually holds the CERTIFY_OTHER key flag at the time the signature was created.

This gap breaks the separation of authority that OpenPGP key flags are intended to express. An offline primary key typically delegates signing to a SIGN_DATA subkey while retaining sole authority to certify identities. The API collapses that distinction, treating any valid binding chain as sufficient to attribute a certification to the certificate as a whole.

Root Cause

The root cause is a missing authorization check [CWE-285] on key capability flags. The code validates the cryptographic signature and the issuer's binding chain, but it does not validate that the issuing component was granted the authority to certify other keys per RFC 9580 Section 5.2.3.29.

Attack Vector

An attacker who has compromised a restricted subkey, such as an online SIGN_DATA signing subkey or a legacy RSA encryption subkey whose algorithm can nonetheless sign, can issue either of two artifacts:

  • A positive User ID certification binding an attacker-controlled identity to the target certificate
  • A full-trust, depth-one direct-key delegation of introducer trust

The vulnerable API returns both as valid signature chains attributed to the offline primary key. Any downstream application treating getCertificationBy(...).isValid() as an identity decision will accept the attacker's assertion.

java
// Patch from OpenPGPCertificate.java adds the mayHaveIssued() authorization check
if (KeyIdentifier.matches(
    rootLink.getSignature().getKeyIdentifiers(),
    issuerKey.getKeyIdentifier(),
    true)
    && mayHaveIssued(issuerKey, rootLink.getSignature()))
{
    OpenPGPSignatureChain externalChain = issuerKey.getSelfSignatureChains()
        .getChainAt(rootLink.getSignature().getCreationTime());

Source: Bouncy Castle GitHub commit f0d5c85

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-71886

Indicators of Compromise

  • Third-party certifications or trust delegations whose issuing component key is a subkey bound only with SIGN_DATA or an RSA encryption subkey rather than the primary key or a CERTIFY_OTHER-flagged subkey
  • Unexpected User ID certifications appearing on certificates whose primary keys are maintained offline
  • Direct-key delegation signatures of introducer trust originating from online signing subkeys

Detection Strategies

  • Inventory applications that depend on org.bouncycastle.openpgp.api.OpenPGPCertificate and record the Bouncy Castle version in use
  • Re-evaluate stored trust decisions by replaying third-party signatures against patched Bouncy Castle 1.86 and flagging any that fail the new mayHaveIssued() check
  • Audit OpenPGP keyring stores for certifications whose issuer component lacks the CERTIFY_OTHER key flag at the signature creation time

Monitoring Recommendations

  • Log every call site that treats getCertificationBy() or getDelegationBy() results as authoritative identity or introducer-trust evidence
  • Alert on application exceptions or trust-chain validation failures following an upgrade to 1.86, as these may surface previously-accepted malicious certifications
  • Monitor key servers and internal keyring synchronization points for third-party signatures sourced from non-certification-capable components

How to Mitigate CVE-2026-71886

Immediate Actions Required

  • Upgrade bcpg-jdk18on and related Bouncy Castle Java artifacts to version 1.86 or later
  • Revoke any subkeys suspected of compromise and reissue them under the offline primary key
  • Re-validate trust decisions made by applications that consumed third-party certifications under affected versions

Patch Information

The fix is delivered in Bouncy Castle for Java 1.86. The commit introduces a mayHaveIssued(issuerKey, signature) guard in OpenPGPCertificate that accepts a third-party certification or delegation only when the issuing component is the primary key or a subkey holding CERTIFY_OTHER at the signature's creation time. Primary keys continue to be accepted regardless of their key-flag subpacket, since a primary key is certification-capable by construction. Third-party revocations are deliberately exempt from the rule because declining to honour one would preserve trust rather than withdraw it. See the Bouncy Castle CVE-2026-71886 Wiki for the vendor advisory.

Workarounds

  • Enforce an application-level check that the issuing component of any accepted third-party certification carries the CERTIFY_OTHER key flag before trusting the result
  • Restrict trust decisions to certifications whose issuer is the primary key only, accepting the loss of certification-capable subkey support until patching
  • Rotate any online signing or encryption subkeys that could have been used to forge certifications under the affected API
bash
# Maven dependency update to the fixed release
# pom.xml
# <dependency>
#   <groupId>org.bouncycastle</groupId>
#   <artifactId>bcpg-jdk18on</artifactId>
#   <version>1.86</version>
# </dependency>
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcpg-jdk18on -DdepVersion=1.86 -DforceVersion=true
mvn dependency:tree | grep bouncycastle

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.