Vulnerabilities in pkg:maven/org.bouncycastle/bcpg-jdk18on

PACKAGE
Advisory Identifier: GHSA-cj8j-37rh-8475
Advisory Summary

CVE-2026-3505 is a HIGH remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Bouncy Castle libraries in the Maven ecosystem. The issue involves bouncy castle uncontrolled resource consumption vulnerability. Remediation is available by upgrading affected packages to version 1.84.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.bouncycastle/bcpg-jdk18on

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.bouncycastle/bcpg-jdk18on. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cj8j-37rh-8475 CVE-2026-3505 HIGH Bouncy Castle Uncontrolled Resource Consumption vulnerability

CVE-2026-3505 at a Glance

CVE Identifier CVE-2026-3505
GHSA Identifier GHSA-cj8j-37rh-8475
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Bouncy Castle
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2026-3505

To remediate this vulnerability, upgrade all affected Bouncy Castle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.bouncycastle:bcpg-jdk12 fixed: Latest secure release
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk12</artifactId>
    <version>Latest secure release</version>
</dependency>
org.bouncycastle:bcpg-jdk14 fixed: 1.84
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk14</artifactId>
    <version>1.84</version>
</dependency>
org.bouncycastle:bcpg-jdk15 fixed: Latest secure release
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk15</artifactId>
    <version>Latest secure release</version>
</dependency>
org.bouncycastle:bcpg-jdk15to18 fixed: 1.84
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk15to18</artifactId>
    <version>1.84</version>
</dependency>
org.bouncycastle:bcpg-jdk15on fixed: Latest secure release
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk15on</artifactId>
    <version>Latest secure release</version>
</dependency>
org.bouncycastle:bcpg-jdk16 fixed: Latest secure release
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk16</artifactId>
    <version>Latest secure release</version>
</dependency>
org.bouncycastle:bcpg-jdk18on fixed: 1.84
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpg-jdk18on</artifactId>
    <version>1.84</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.bouncycastle

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-3505, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.bouncycastle

Analyze the terminal output to locate any version of Bouncy Castle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.84), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.bouncycastle command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Bouncy Castle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Allocation of resources without limits or throttling vulnerability in Legion of the Bouncy Castle Inc. BC-JAVA bcpg on all (pg modules). This issue affects BC-JAVA before 1.84. Unbounded PGP AEAD chunk size leads to pre-auth resource exhaustion.

CVE-2026-3505 Affected Bouncy Castle Versions

7 component(s)
Fixed Versions:
1.84
Product / Package Ecosystem Affected Versions Fixed Version
org.bouncycastle:bcpg-jdk12
Maven
≤ 130
org.bouncycastle:bcpg-jdk14
Maven
< 1.84
1.84
org.bouncycastle:bcpg-jdk15
Maven
≤ 1.46
org.bouncycastle:bcpg-jdk15to18
Maven
< 1.84
1.84
org.bouncycastle:bcpg-jdk15on
Maven
≤ 1.70
org.bouncycastle:bcpg-jdk16
Maven
≤ 1.46
org.bouncycastle:bcpg-jdk18on
Maven
< 1.84
1.84

References

Frequently Asked Questions

What is CVE-2026-3505?
CVE-2026-3505 is a security vulnerability in Bouncy Castle involving Bouncy Castle Uncontrolled Resource Consumption vulnerability under CWE-400: Uncontrolled Resource Consumption.
Which Bouncy Castle versions are affected?
Affected versions include releases prior to 1.84 across affected packages: org.bouncycastle:bcpg-jdk12, org.bouncycastle:bcpg-jdk14, org.bouncycastle:bcpg-jdk15, org.bouncycastle:bcpg-jdk15to18, org.bouncycastle:bcpg-jdk15on, org.bouncycastle:bcpg-jdk16, org.bouncycastle:bcpg-jdk18on.
What version fixes CVE-2026-3505?
Upgrading to 1.84 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bcpg-jdk12 affected?
Yes, org.bouncycastle:bcpg-jdk12 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is bcpg-jdk14 affected?
Yes, org.bouncycastle:bcpg-jdk14 is affected in releases prior to 1.84. Upgrade your dependency to 1.84 or later.
What CWE is associated with CVE-2026-3505?
CVE-2026-3505 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2026-3505?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.bouncycastle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cj8j-37rh-8475",
  "modified" : "2026-04-18T01:06:35Z",
  "published" : "2026-04-17T18:31:50Z",
  "aliases" : [ "CVE-2026-3505" ],
  "summary" : "Bouncy Castle Uncontrolled Resource Consumption vulnerability",
  "details" : "Allocation of resources without limits or throttling vulnerability in Legion of the Bouncy Castle Inc. BC-JAVA bcpg on all (pg modules). This issue affects BC-JAVA before 1.84.\n\nUnbounded PGP AEAD chunk size leads to pre-auth resource exhaustion.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "130"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk14"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.84"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk15"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.46"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk15to18"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.84"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk15on"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.70"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk16"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.46"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcpg-jdk18on"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.84"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-3505"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/commit/dc7530939ffb6cdb57636f3609d98e23b94e71c1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bcgit/bc-java"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%903505"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-18T01:06:35Z",
    "nvd_published_at" : "2026-04-15T10:16:49Z"
  }
}