CVE-2018-1000180: Bouncy Castle Bouncy Castle Has A Flaw Vulnerability

HIGH
Advisory Identifier: GHSA-xqj7-j8j5-f2xr
CVSS 7.5
CWE-327
Published
Advisory Summary

CVE-2018-1000180 is a HIGH (CVSS 7.5) bouncy castle has a flaw vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Bouncy Castle libraries in the Maven ecosystem. The issue involves bouncy castle has a flaw in the low-level interface to rsa key pair generator. Remediation is available by upgrading affected packages to version 1.60.

CVE-2018-1000180 at a Glance

CVE Identifier CVE-2018-1000180
GHSA Identifier GHSA-xqj7-j8j5-f2xr
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Bouncy Castle
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2018-1000180

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:bcprov-jdk14 fixed: 1.60
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk14</artifactId>
    <version>1.60</version>
</dependency>
org.bouncycastle:bcprov-jdk15 fixed: 1.60
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15</artifactId>
    <version>1.60</version>
</dependency>
org.bouncycastle:bcprov-jdk15on fixed: 1.60
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15on</artifactId>
    <version>1.60</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-2018-1000180, 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.60), 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. 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

Bouncy Castle BC 1.54 - 1.59, BC-FJA 1.0.0, BC-FJA 1.0.1 and earlier have a flaw in the Low-level interface to RSA key pair generator, specifically RSA Key Pairs generated in low-level API with added certainty may have less M-R tests than expected. This appears to be fixed in versions BC 1.60 beta 4 and later, BC-FJA 1.0.2 and later.

CVE-2018-1000180 Affected Bouncy Castle Versions

3 component(s)
Fixed Versions:
1.60
Product / Package Ecosystem Affected Versions Fixed Version
org.bouncycastle:bcprov-jdk14
Maven
< 1.60
1.60
org.bouncycastle:bcprov-jdk15
Maven
< 1.60
1.60
org.bouncycastle:bcprov-jdk15on
Maven
< 1.60
1.60

References

NVD — CVE-2018-1000180 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1000180
Security Fix Commit FIX COMMIT
https://github.com/bcgit/bc-java/commit/22467b6e8fe19717ecdf201c0cf91bacf04a55ad
Security Fix Commit FIX COMMIT
https://github.com/bcgit/bc-java/commit/73780ac522b7795fc165630aba8d5f5729acc839
Bouncy Castle Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
Bouncy Castle Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
Bouncy Castle Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html
Bouncy Castle Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html
Bouncy Castle Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2020.html
Bouncy Castle Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Bouncy Castle Security Information SECURITY
https://www.debian.org/security/2018/dsa-4233
www.bountysource.com/issues/58293083-rsa... WEB
https://www.bountysource.com/issues/58293083-rsa-key-generation-computation-of-iterations-for-mr-primality-test
Bouncy Castle Security Information SECURITY
https://security.netapp.com/advisory/ntap-20190204-0003
lists.apache.org/thread.html/708d941... WEB
https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E
GitHub Advisory / Wiki ADVISORY
https://github.com/bcgit/bc-java/wiki/CVE-2018-1000180
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-xqj7-j8j5-f2xr
access.redhat.com/errata/rhsa-2019:08... WEB
https://access.redhat.com/errata/RHSA-2019:0877
access.redhat.com/errata/rhsa-2018:26... WEB
https://access.redhat.com/errata/RHSA-2018:2669
access.redhat.com/errata/rhsa-2018:26... WEB
https://access.redhat.com/errata/RHSA-2018:2643
access.redhat.com/errata/rhsa-2018:24... WEB
https://access.redhat.com/errata/RHSA-2018:2428
access.redhat.com/errata/rhsa-2018:24... WEB
https://access.redhat.com/errata/RHSA-2018:2425
access.redhat.com/errata/rhsa-2018:24... WEB
https://access.redhat.com/errata/RHSA-2018:2424
access.redhat.com/errata/rhsa-2018:24... WEB
https://access.redhat.com/errata/RHSA-2018:2423
Bouncy Castle Security Information SECURITY
http://www.securityfocus.com/bid/106567

Frequently Asked Questions

What is CVE-2018-1000180?
CVE-2018-1000180 is a security vulnerability in Bouncy Castle involving Bouncy Castle has a flaw in the Low-level interface to RSA key pair generator under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Bouncy Castle versions are affected?
Affected versions include releases prior to 1.60 across affected packages: org.bouncycastle:bcprov-jdk14, org.bouncycastle:bcprov-jdk15, org.bouncycastle:bcprov-jdk15on.
What version fixes CVE-2018-1000180?
Upgrading to 1.60 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bcprov-jdk14 affected?
Yes, org.bouncycastle:bcprov-jdk14 is affected in releases prior to 1.60. Upgrade your dependency to 1.60 or later.
Is bcprov-jdk15 affected?
Yes, org.bouncycastle:bcprov-jdk15 is affected in releases prior to 1.60. Upgrade your dependency to 1.60 or later.
What is the CVSS score of CVE-2018-1000180?
CVE-2018-1000180 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2018-1000180?
CVE-2018-1000180 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Maven dependencies for CVE-2018-1000180?
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-xqj7-j8j5-f2xr",
  "modified" : "2025-09-12T19:26:53Z",
  "published" : "2018-10-16T17:44:39Z",
  "aliases" : [ "CVE-2018-1000180" ],
  "summary" : "Bouncy Castle has a flaw in the Low-level interface to RSA key pair generator",
  "details" : "Bouncy Castle BC 1.54 - 1.59, BC-FJA 1.0.0, BC-FJA 1.0.1 and earlier have a flaw in the Low-level interface to RSA key pair generator, specifically RSA Key Pairs generated in low-level API with added certainty may have less M-R tests than expected. This appears to be fixed in versions BC 1.60 beta 4 and later, BC-FJA 1.0.2 and later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcprov-jdk14"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.60"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcprov-jdk15"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.60"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcprov-jdk15on"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.60"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000180"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/commit/22467b6e8fe19717ecdf201c0cf91bacf04a55ad"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/commit/73780ac522b7795fc165630aba8d5f5729acc839"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4233"
  }, {
    "type" : "WEB",
    "url" : "https://www.bountysource.com/issues/58293083-rsa-key-generation-computation-of-iterations-for-mr-primality-test"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20190204-0003"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/wiki/CVE-2018-1000180"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-xqj7-j8j5-f2xr"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0877"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2669"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2643"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2428"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2425"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2424"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2423"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/106567"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T22:04:14Z",
    "nvd_published_at" : "2018-06-05T13:29:00Z"
  }
}