Vulnerabilities in pkg:maven/org.bouncycastle/bcprov-jdk15
PACKAGECVE-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.
pkg:maven/org.bouncycastle/bcprov-jdk15
Vulnerability advisories affecting package pkg:maven/org.bouncycastle/bcprov-jdk15. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4mv7-cq75-3qjm | CVE-2015-7940 | MODERATE | Moderate severity vulnerability that affects org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 |
| GHSA-r97x-3g8f-gx3m | CVE-2016-1000340 | HIGH | The Bouncy Castle JCE Provider carry a propagation bug |
| GHSA-4vhj-98r6-424h | CVE-2016-1000338 | HIGH | In Bouncy Castle JCE Provider it is possible to inject extra elements in the sequence making up the signature and still have it validate |
| GHSA-xqj7-j8j5-f2xr | CVE-2018-1000180 | HIGH | Bouncy Castle has a flaw in the Low-level interface to RSA key pair generator |
| GHSA-w285-wf9q-5w69 | CVE-2016-1000352 | HIGH | In Bouncy Castle JCE Provider the ECIES implementation allowed the use of ECB mode |
| GHSA-fjqm-246c-mwqg | CVE-2016-1000346 | LOW | In Bouncy Castle JCE Provider the other party DH public key is not fully validated |
| GHSA-9gp4-qrff-c648 | CVE-2016-1000345 | MODERATE | Moderate severity vulnerability that affects org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 |
| GHSA-2j2x-hx4g-2gf4 | CVE-2016-1000344 | HIGH | In Bouncy Castle JCE Provider the DHIES implementation allowed the use of ECB mode |
| GHSA-rrvx-pwf8-p59p | CVE-2016-1000343 | HIGH | In Bouncy Castle JCE Provider the DSA key pair generator generates a weak private key if used with default values |
| GHSA-r9ch-m4fh-fc7q | CVE-2016-1000341 | MODERATE | Moderate severity vulnerability that affects org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 |
| GHSA-c8xf-m4ff-jcxj | CVE-2016-1000339 | MODERATE | Moderate severity vulnerability that affects org.bouncycastle:bcprov-jdk14 and org.bouncycastle:bcprov-jdk15 |
| GHSA-qcj7-g2j5-g7r3 | CVE-2016-1000342 | HIGH | In Bouncy Castle JCE Provider ECDSA does not fully validate ASN.1 encoding of signature on verification |
| GHSA-6xx3-rg99-gc3p | CVE-2020-15522 | MODERATE | Timing based private key exposure in Bouncy Castle |
| GHSA-72m5-fvvv-55m6 | CVE-2020-26939 | MODERATE | Observable Differences in Behavior to Error Inputs in Bouncy Castle |
| GHSA-wjxj-5m7g-mg7q | CVE-2023-33202 | MODERATE | Bouncy Castle Denial of Service (DoS) |
| GHSA-73xv-w5gp-frxh | CVE-2020-28052 | HIGH | Logic error in Legion of the Bouncy Castle BC Java |
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"
}
}