Memory Allocation with Excessive Size Value Affecting org.bouncycastle:bcprov-jdk14 package, versions [,1.85)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.39% (32nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGBOUNCYCASTLE-18519182
  • published5 Aug 2026
  • disclosed3 Aug 2026
  • creditUnknown

Introduced: 3 Aug 2026

NewCVE-2026-58060  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade org.bouncycastle:bcprov-jdk14 to version 1.85 or higher.

Overview

org.bouncycastle:bcprov-jdk14 is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value in HSSPublicKeyParameters.getInstance() and HSSSignature.getInstance(), which read the HSS level count L from an encoded public key without the RFC 8554 depth cap of 8 (enforced only during key generation) and then allocate arrays sized from that attacker-controlled value. An attacker can force an allocation of roughly 17 GB, driving the verifier to OutOfMemoryError, by supplying an HSS public key and signature that declare an oversized level count. This requires the verifier to process attacker-supplied HSS/LMS public keys and signatures, reachable via SubjectPublicKeyInfo, the JCA LMSKeyFactorySpi/LMSSignatureSpi, or CMS (RFC 9708) verification.

CVSS Base Scores

version 4.0
version 3.1