Memory Allocation with Excessive Size Value Affecting org.bouncycastle:bctls-fips package, versions [,1.0.24)[2.0.19,2.0.24)[2.1.20,2.1.24)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.62% (48th 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-18512890
  • published4 Aug 2026
  • disclosed3 Aug 2026
  • creditUnknown

Introduced: 3 Aug 2026

CVE-2026-59646  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade org.bouncycastle:bctls-fips to version 1.0.24, 2.0.24, 2.1.24 or higher.

Overview

Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value in the processRecord() method of DTLSReliableHandshake, where the DTLSReassembler constructor allocates a byte[length] buffer directly from the 24-bit handshake length field without checking it against peer.getMaxHandshakeMessageSize(), unlike the stream-TLS path. An attacker can drive the JVM to OutOfMemoryError with a handful of small UDP datagrams by sending a single ~205-byte epoch-0 record carrying 16 fragment headers with length=0xFFFFFF and fragment_length=0, forcing roughly 256 MiB of allocation before any authentication. This requires only the ability to send UDP records to a DTLS listener, with each connection buffering up to 16 message_seq values.

CVSS Base Scores

version 4.0
version 3.1