Bouncy Castle Java Cryptography API vulnerable to DNS poisoning
Published 3 May 2024 · Updated 10 Sept 2026
Is your project on an affected org.bouncycastle:bcprov-jdk18on?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=1.61 <1.78
- Fixed in
- 1.78
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk18on -DdepVersion=1.78 -DforceVersion=true- Affected
- >=1.61 <1.78
- Fixed in
- 1.78
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk15to18 -DdepVersion=1.78 -DforceVersion=true- Affected
- >=1.61 <1.78
- Fixed in
- 1.78
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk14 -DdepVersion=1.78 -DforceVersion=true- Affected
- >=1.61 <1.78
- Fixed in
- 1.78
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk12 -DdepVersion=1.78 -DforceVersion=true- Affected
- <1.0.19
- Fixed in
- 1.0.19
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bctls-fips -DdepVersion=1.0.19 -DforceVersion=true- Affected
- <2.73.6
- Fixed in
- 2.73.6
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-lts8on -DdepVersion=2.73.6 -DforceVersion=true- Affected
- >=1.61 <1.78
- Fixed in
- 1.78
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk15on -DdepVersion=1.78 -DforceVersion=trueDetails
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.
Is GHSA-4h8f-2wvx-gg5w in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.bouncycastle:bcprov-jdk18on, and gives you the command that fixes it.
More advisories for org.bouncycastle:bcprov-jdk18on
- HighCVE-2026-13506Bouncy Castle: Lazy ASN.1 sequence forcing resets nesting-depth guard · 3 Aug 2026
- CriticalCVE-2026-8763Bouncy Castle: Name Constraints bypass via trailing dot in rfc822Name and URI · 3 Aug 2026
- CriticalCVE-2025-14813Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks · 17 Apr 2026
- HighCVE-2026-5598Bouncy Castle Has Covert Timing Channel Vulnerability · 17 Apr 2026
- MediumCVE-2026-0636Bouncy Castle has an LDAP injection · 17 Apr 2026
- MediumCVE-2025-8885Bouncy Castle for Java on All (API modules) allows Excessive Allocation · 12 Aug 2025
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.