Improper Validation of Integrity Check Value in Bouncy Castle
Published 13 May 2022 · Updated 8 Nov 2023
Is your project on an affected org.bouncycastle:bcprov-jdk15on?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.50
- Fixed in
- 1.50
mvn versions:use-dep-version -Dincludes=org.bouncycastle:bcprov-jdk15on -DdepVersion=1.50 -DforceVersion=trueDetails
The default BKS keystore use an HMAC that is only 16 bits long, which can allow an attacker to compromise the integrity of a BKS keystore. Bouncy Castle release 1.47 changes the BKS format to a format which uses a 160 bit HMAC instead. This applies to any BKS keystore generated prior to BC 1.47. For situations where people need to create the files for legacy reasons a specific keystore type "BKS-V1" was introduced in 1.49. It should be noted that the use of "BKS-V1" is discouraged by the library authors and should only be used where it is otherwise safe to do so, as in where the use of a 16 bit checksum for the file integrity check is not going to cause a security issue in itself.
Is GHSA-8477-3v39-ggpm 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-jdk15on, and gives you the command that fixes it.
More advisories for org.bouncycastle:bcprov-jdk15on
- CriticalCVE-2025-14813Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks · 17 Apr 2026
- MediumCVE-2024-29857Bouncy Castle certificate parsing issues cause high CPU usage during parameter evaluation. · 14 May 2024
- MediumCVE-2024-30171Bouncy Castle affected by timing side-channel for RSA key exchange ("The Marvin Attack") · 14 May 2024
- MediumCVE-2024-34447Bouncy Castle Java Cryptography API vulnerable to DNS poisoning · 3 May 2024
- MediumCVE-2023-33202Bouncy Castle Denial of Service (DoS) · 23 Nov 2023
- MediumCVE-2023-33201Bouncy Castle For Java LDAP injection vulnerability · 5 Jul 2023
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.