CVE-2018-1000180: Bouncy Castle Low-level RSA Key Pair Generator Flaw

Summary

16/10/2018
Yes i
High
7.5

CVE-2018-1000180: Bouncy Castle has a flaw in the Low-level interface to RSA key pair generator. Affects org.bouncycastle:bcprov-jdk14 versions < 1.60. Fixed in 1.60. How to fix ↓

Also tracked for

The same CVE-2018-1000180 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Bouncy Castle is an open-source cryptographic library that provides various cryptographic algorithms and protocols. It is widely used in Java applications for secure communication and data encryption. The library includes a low-level interface for generating RSA key pairs, which is used by many applications for cryptographic operations. However, versions BC 1.54 - 1.59, BC-FJA 1.0.0, BC-FJA 1.0.1, and earlier have a flaw in this low-level interface that affects the generation of RSA key pairs with added certainty. This flaw results in RSA key pairs having fewer M-R tests than expected, potentially weakening the security of the generated keys. The vulnerability has been assigned CVE-2018-1000180 and has a CVSS score of 7.5 (High).

Vulnerability Detail

The vulnerability in Bouncy Castle's low-level interface to RSA key pair generator allows RSA key pairs generated with added certainty to have fewer M-R tests than expected. This means that the generated keys may have weaker cryptographic properties than intended, potentially making them more susceptible to attacks. The issue has been fixed in versions BC 1.60 beta 4 and later, as well as BC-FJA 1.0.2 and later.

How To Fix

Latest published version: 1.86 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.60

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is necessary to update the Bouncy Castle library to a fixed version.

Conclusion

The vulnerability in Bouncy Castle's low-level RSA key pair generator can result in weaker RSA key pairs, potentially compromising the security of cryptographic operations. It is crucial to update the affected Bouncy Castle library to version 1.60 or later to fix this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for org.bouncycastle:bcprov-jdk14 →

Share this vulnerability

FAQ

Bouncy Castle is an open-source cryptographic library for Java applications that provides various cryptographic algorithms and protocols.

The vulnerability in the low-level RSA key pair generator of Bouncy Castle can result in weaker RSA key pairs, potentially compromising the security of cryptographic operations that rely on these keys.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

There are no known exploits for this vulnerability at the moment. However, it is recommended to update the Bouncy Castle library to the fixed version to mitigate any potential risks.

You can find more information about this vulnerability, including the CVE identifier and the fix, in the GitHub Advisory Database at the following link: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/10/GHSA-xqj7-j8j5-f2xr/GHSA-xqj7-j8j5-f2xr.json

Related vulnerabilities

Recent vulnerabilities recorded for org.bouncycastle:bcprov-jdk14.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 1.86 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.60

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback