CVE-2024-34447: Bouncy Castle Bouncy Castle Java Cryptography API Vulnerability
MODERATECVE-2024-34447 is a MODERATE (CVSS 5.9) bouncy castle java cryptography api vulnerability (CWE-297: Improper Validation of Certificate with Host Mismatch) affecting Bouncy Castle libraries in the Maven ecosystem. The issue involves bouncy castle java cryptography api vulnerable to dns poisoning. Remediation is available by upgrading affected packages to version 1.78, 1.0.19, 2.73.6.
CVE-2024-34447 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2024-34447
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-jdk18on</artifactId>
<version>1.78</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<version>1.78</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
<version>1.78</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk12</artifactId>
<version>1.78</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bctls-fips</artifactId>
<version>1.0.19</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-lts8on</artifactId>
<version>2.73.6</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.78</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-2024-34447, 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.78), 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-297: Improper Validation of Certificate with Host Mismatch, where the product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host. 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-2024-34447 Affected Bouncy Castle Versions
7 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.bouncycastle:bcprov-jdk18on
|
Maven |
≥ 1.61
< 1.78
|
1.78
|
|
org.bouncycastle:bcprov-jdk15to18
|
Maven |
≥ 1.61
< 1.78
|
1.78
|
|
org.bouncycastle:bcprov-jdk14
|
Maven |
≥ 1.61
< 1.78
|
1.78
|
|
org.bouncycastle:bcprov-jdk12
|
Maven |
≥ 1.61
< 1.78
|
1.78
|
|
org.bouncycastle:bctls-fips
|
Maven |
< 1.0.19
|
1.0.19
|
|
org.bouncycastle:bcprov-lts8on
|
Maven |
< 2.73.6
|
2.73.6
|
|
org.bouncycastle:bcprov-jdk15on
|
Maven |
≥ 1.61
< 1.78
|
1.78
|
References
Frequently Asked Questions
What is CVE-2024-34447?
Which Bouncy Castle versions are affected?
What version fixes CVE-2024-34447?
Is bcprov-jdk18on affected?
Is bcprov-jdk15to18 affected?
What is the CVSS score of CVE-2024-34447?
What CWE is associated with CVE-2024-34447?
How can I check Maven dependencies for CVE-2024-34447?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4h8f-2wvx-gg5w",
"modified" : "2026-04-17T13:22:45Z",
"published" : "2024-05-03T18:30:37Z",
"aliases" : [ "CVE-2024-34447" ],
"summary" : "Bouncy Castle Java Cryptography API vulnerable to DNS poisoning",
"details" : "An issue was discovered in the Bouncy Castle Crypto Package For Java before BC TLS Java 1.0.19 (ships with BC Java 1.78, BC Java (LTS) 2.73.6) and before BC FIPS TLS Java 1.0.19. When endpoint identification is enabled in the BCJSSE and an SSL socket is created without an explicit hostname (as happens with HttpsURLConnection), hostname verification could be performed against a DNS-resolved IP address in some situations, opening up a possibility of DNS poisoning.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk18on"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.61"
}, {
"fixed" : "1.78"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk15to18"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.61"
}, {
"fixed" : "1.78"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk14"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.61"
}, {
"fixed" : "1.78"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk12"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.61"
}, {
"fixed" : "1.78"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bctls-fips"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.19"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-lts8on"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.73.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.bouncycastle:bcprov-jdk15on"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.61"
}, {
"fixed" : "1.78"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34447"
}, {
"type" : "WEB",
"url" : "https://github.com/bcgit/bc-java/issues/1656"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bcgit/bc-java"
}, {
"type" : "WEB",
"url" : "https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902024%E2%80%9034447"
}, {
"type" : "WEB",
"url" : "https://www.bouncycastle.org/latest_releases.html"
}, {
"type" : "WEB",
"url" : "http://security.netapp.com/advisory/ntap-20240614-0007"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-297" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-03T20:34:32Z",
"nvd_published_at" : "2024-05-03T16:15:11Z"
}
}