Skip to content
Heist/ feed
Back to feed
Medium

bouncycastle — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-71892

In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for

Products
bouncycastle
Affected versions
1.49+dfsg-3ubuntu1, 1.51-4ubuntu1, 1.51-4ubuntu1+esm1, 1.57-1, 1.58-1, 1.59-1, 1.59-1ubuntu0.1~esm1, 1.61-1, 1.61-1ubuntu0.1~esm1, 1.68-2, 1.68-4, 1.68-5, 1.68-5ubuntu0.1~esm1, 1.72-2, 1.77-1, 1.77-1ubuntu0.1~esm1, 1.80-3
Fixed versions
Not specified
CVEs
CVE-2026-71892
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 03:15 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-71892

core-osv · Original source

Published 3 Oct 2026, 09:17 UTC

In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for

osv:UBUNTU-CVE-2026-71892

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

Complete source record
{
  "id": "67a087605995bc029058f214e07a3dd3f4c3351f5e68be93e83e08fade3c2a34",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-71892",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-71892",
    "summary": "In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for",
    "evidence": "osv:UBUNTU-CVE-2026-71892",
    "products": [
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.49+dfsg-3ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.51-4ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.51-4ubuntu1+esm1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.57-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.58-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.59-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.59-1ubuntu0.1~esm1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.61-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.61-1ubuntu0.1~esm1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.68-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.68-4",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.68-5",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.68-5ubuntu0.1~esm1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.72-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.77-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.77-1ubuntu0.1~esm1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.80-3",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.80-3",
            "evidence": "/affected/6/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-71892",
      "aliases": [
        "UBUNTU-CVE-2026-71892"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/U:Amber"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=esm-apps%2Fxenial",
            "ecosystem": "Ubuntu:Pro:16.04:LTS"
          },
          "versions": [
            "1.49+dfsg-3ubuntu1",
            "1.51-4ubuntu1",
            "1.51-4ubuntu1+esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.51-4ubuntu1+esm1"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.51-4ubuntu1+esm1"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.51-4ubuntu1+esm1"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.51-4ubuntu1+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=esm-apps%2Fbionic",
            "ecosystem": "Ubuntu:Pro:18.04:LTS"
          },
          "versions": [
            "1.57-1",
            "1.58-1",
            "1.59-1",
            "1.59-1ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.59-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.59-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.59-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.59-1ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=esm-apps%2Ffocal",
            "ecosystem": "Ubuntu:Pro:20.04:LTS"
          },
          "versions": [
            "1.61-1",
            "1.61-1ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.61-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.61-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.61-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.61-1ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=esm-apps%2Fjammy",
            "ecosystem": "Ubuntu:Pro:22.04:LTS"
          },
          "versions": [
            "1.68-2",
            "1.68-4",
            "1.68-5",
            "1.68-5ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.68-5ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.68-5ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.68-5ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.68-5ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbctls-java",
                "binary_version": "1.68-5ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=esm-apps%2Fnoble",
            "ecosystem": "Ubuntu:Pro:24.04:LTS"
          },
          "versions": [
            "1.72-2",
            "1.77-1",
            "1.77-1ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcjmail-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbctls-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "libbcutil-java",
                "binary_version": "1.77-1ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "1.80-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcjmail-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbctls-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcutil-java",
                "binary_version": "1.80-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/ubuntu/bouncycastle?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "1.80-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71892.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libbcjmail-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcmail-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcpg-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcpkix-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcprov-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbctls-java",
                "binary_version": "1.80-3"
              },
              {
                "binary_name": "libbcutil-java",
                "binary_version": "1.80-3"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T13:00:47.348333898Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-71892"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-71892",
        "https://www.cve.org/CVERecord?id=CVE-2026-71892",
        "https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%9071892",
        "https://github.com/bcgit/bc-java/commit/be0a7d925c818ef2f338bcec55178b9b6336dfc3"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-71892",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 360838,
  "published_at": "2026-10-03T09:17:00+00:00"
}