Advisories for Maven/Org.bouncycastle/Bctls-Jdk15to18 package

2026

JSSE hostname verifier CN-fallback enabled by default despite documented opt-in

Affects Bouncy Castle for Java before 1.85. HostnameUtil gates the fallback that matches the certificate CN when no dNSName SAN is present on a property whose unset default the code treats as enabled, contrary to its documentation. Because name-constraint processing only constrains SAN entries of the constrained type, a leaf with no dNSName SAN passes a dNSName-constrained chain, and the verifier then matches the attacker-chosen CN against the target hostname.

DTLS handshake reassembler allocates buffer from unchecked 24-bit length

Affects Bouncy Castle for Java before 1.85. DTLSReliableHandshake.processRecord() allocates a reassembly buffer sized from the 24-bit handshake length field of an incoming record, without the maximum-message-size check the stream-TLS path applies. Up to sixteen message sequences may be buffered per connection, so a single record of about 205 bytes carrying sixteen fragment headers with a maximal length forces roughly 256 MiB of allocation before any authentication. A few small UDP …

2025

Bouncy Castle for Java on All (API modules) allows Excessive Allocation

A resource allocation vulnerability exists in Bouncy Castle for Java (by Legion of the Bouncy Castle Inc.) that affects all API modules. The vulnerability allows attackers to cause excessive memory allocation through unbounded resource consumption, potentially leading to denial of service. The issue is located in the ASN1ObjectIdentifier.java file in the core module. This issue affects Bouncy Castle for Java: from BC 1.0 through 1.77, from BC-FJA 1.0.0 through 2.0.0.

2024