Skip to content

GHSA-8477-3v39-ggpm CVE-2018-5382

Improper Validation of Integrity Check Value in Bouncy Castle

Medium Maven
Severity
4.4 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.26%
Chance of exploitation in the next 30 days. Higher than 17.83% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-354 Improper Validation of Integrity Check Value
Fix
1.50
Upgrade org.bouncycastle:bcprov-jdk15on to this version or later

Description

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.

Affected versions

Maven

PackageVulnerableFixed in
org.bouncycastle:bcprov-jdk15on
< 1.50
1.50

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.bouncycastle:bcprov-jdk15on Maven → 1.50

maven
<dependency><groupId>org.bouncycastle</groupId><artifactId>bcprov-jdk15on</artifactId><version>1.50</version></dependency>
gradle
implementation("org.bouncycastle:bcprov-jdk15on:1.50")

Severity breakdown

CVSS 3.1 4.4

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-354: Improper Validation of Integrity Check Value

The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission.

How to prevent it
  • Implementation: Ensure that the checksums present in messages are properly checked in accordance with the protocol specification before they are parsed and used.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-574f-3g2m-x479
Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks
High Also affects org.bouncycastle:bcprov-jdk15on
GHSA-v435-xc8x-wvr9
Bouncy Castle affected by timing side-channel for RSA key exchange ("The Marvin Attack")
Medium Also affects org.bouncycastle:bcprov-jdk15on
GHSA-8xfc-gm6g-vgpv
Bouncy Castle certificate parsing issues cause high CPU usage during parameter evaluation.
High Also affects org.bouncycastle:bcprov-jdk15on
GHSA-4h8f-2wvx-gg5w
Bouncy Castle Java Cryptography API vulnerable to DNS poisoning
High Also affects org.bouncycastle:bcprov-jdk15on
GHSA-wjxj-5m7g-mg7q
Bouncy Castle Denial of Service (DoS)
Medium Also affects org.bouncycastle:bcprov-jdk15on
GHSA-hr8g-6v94-x4m9
Bouncy Castle For Java LDAP injection vulnerability
Medium Also affects org.bouncycastle:bcprov-jdk15on
GHSA-8353-fgcr-xfhx
Improper Input Validation in Bouncy Castle
Medium Also affects org.bouncycastle:bcprov-jdk15on
GHSA-wrwf-pmmj-w989
Observable Discrepancy in BouncyCastle
Medium Also affects org.bouncycastle:bcprov-jdk15on
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor