CVE-2015-7940: Bouncy Castle Bcprov-jdk14 And Org.bouncycastle:bcprov-jdk15 Vulnerability
MODERATECVE-2015-7940 is a MODERATE bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Bouncy Castle libraries in the Maven ecosystem. The issue involves bcprov-jdk14 and org.bouncycastle:bcprov-jdk15. Remediation is available by upgrading affected packages to version 1.51.
CVE-2015-7940 at a Glance
How to Fix CVE-2015-7940
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.
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15</artifactId>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.51</version>
</dependency>
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-2015-7940, 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.51), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. 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
CVE-2015-7940 Affected Bouncy Castle Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.bouncycastle:bcprov-jdk15
|
Maven |
< 1.51
|
1.51
|
|
org.bouncycastle:bcprov-jdk14
|
Maven |
< 1.51
|
1.51
|
|
org.bouncycastle:bcprov-jdk15on
|
Maven |
< 1.51
|
1.51
|
References
Frequently Asked Questions
What is CVE-2015-7940?
Which Bouncy Castle versions are affected?
What version fixes CVE-2015-7940?
Is bcprov-jdk15 affected?
Is bcprov-jdk14 affected?
What CWE is associated with CVE-2015-7940?
How can I check Maven dependencies for CVE-2015-7940?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4mv7-cq75-3qjm",
"modified" : "2025-09-12T19:30:13Z",
"published" : "2018-10-17T16:27:50Z",
"aliases" : [ "CVE-2015-7940" ],
"summary" : "Moderate severity vulnerability that affects org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15",
"details" : "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 (ECDH) key exchanges, aka an \"invalid curve attack.\"",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk15"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.51"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk14"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.51"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk15on"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.51"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-7940"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-4mv7-cq75-3qjm"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/3727-1"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2016-January/174915.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00012.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2016-2035.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2016-2036.html"
}, {
"type" : "WEB",
"url" : "http://web-in-security.blogspot.ca/2015/09/practical-invalid-curve-attacks.html"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2015/dsa-3417"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2015/10/22/7"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2015/10/22/9"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2017-3236622.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2016-2881722.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/79091"
}, {
"type" : "WEB",
"url" : "http://www.securitytracker.com/id/1037036"
}, {
"type" : "WEB",
"url" : "http://www.securitytracker.com/id/1037046"
}, {
"type" : "WEB",
"url" : "http://www.securitytracker.com/id/1037053"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:58:37Z",
"nvd_published_at" : "2015-11-09T16:59:09Z"
}
}