CVE-2015-7940: org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 - Invalid Curve Attack
Summary
CVE-2015-7940: The Bouncy Castle Java library before 1.51 does not validate a point is withing the elliptic curve, which makes it easier for remote attackers to obtain private keys via a series of crafted elliptic curve Diffie Hellman... Affects org.bouncycastle:bcprov-jdk15 versions < 1.51. Fixed in 1.51. How to fix ↓
Also tracked for
- bouncycastle · Debian:11
The same CVE-2015-7940 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
The org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 packages are part of the Bouncy Castle Java library. These packages provide cryptographic algorithms and utilities for Java applications. The library includes support for elliptic curve cryptography, including elliptic curve Diffie Hellman (ECDH) key exchanges.
Vulnerability Detail
The Bouncy Castle Java library versions prior to 1.51 do not properly validate if a point is within the elliptic curve. This vulnerability allows remote attackers to obtain private keys by exploiting a series of crafted elliptic curve Diffie Hellman (ECDH) key exchanges. This attack is known as an 'invalid curve attack'. By manipulating the key exchange process, an attacker can retrieve sensitive information and compromise the security of the system.
How To Fix
Minimum fixed version
1.51
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 affected packages to the fixed version.
Conclusion
The org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 packages are vulnerable to an 'invalid curve attack' that allows remote attackers to obtain private keys. To mitigate this vulnerability, it is crucial to update the affected packages to version 1.51 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.bouncycastle:bcprov-jdk15 →
FAQ
This vulnerability allows remote attackers to obtain private keys, potentially leading to unauthorized access, data leakage, or further compromise of the system.
No, only versions prior to 1.51 of the org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 packages are affected.
Yes, an 'invalid curve attack' can be used to exploit this vulnerability and retrieve private keys.
No, the vulnerability is inherent to the affected versions of the Bouncy Castle library. Updating to the fixed version is the recommended solution.
You can find more information about this vulnerability in the CVE-2015-7940 advisory and the GitHub advisory database.